The colorpicker documentation mentions that you have to define the slider and class properties while initializing the colorpicker for making it bigger. In this way, you don't have to make changes during the colorpicker initialization. You make your change once, and it will work for every initialization.
For making the colorpicker larger, you have to find the below-mentioned classes in the bootstrap-colorpicker.css file and replace the properties according to below-mentioned styles. This will also work in responsive UI.
Changes in bootstrap-colorpicker.css
Note
Width and height should be same in each class.
- .colorpicker - saturation {
- width: 100 px;
- height: 100 px;
- background - image: url...........
- }.colorpicker - hue, .colorpicker - alpha {
- width: 15 px;
- height: 100 px;
- float: left;
- cursor: row - resize;
- margin - left: 4 px;
- margin - bottom: 4 px;
- }.colorpicker.colorpicker - horizontal.colorpicker - bar {
- width: 100 px;
- }.colorpicker.colorpicker - horizontal.colorpicker - hue.colorpicker - guide, .colorpicker.colorpicker - horizontal.colorpicker - alpha.colorpicker - guide {
- display: block;
- height: 15 px;
- background: #ffffff;
- position: absolute;
- top: 0;
- left: 0;
- width: 1 px;
- border: none;
- margin - top: 0;
- }.colorpicker - bar - horizontal {
- height: 15 px;
- margin: 0 0 4 px 0;
- float: left;
- width: 100 px;
- }.colorpicker - bar {
- height: 15 px;
- margin: 5 px 0 0 0;
- clear: both;
- text - align: center;
- font - size: 10 px;
- }
Change the below mentioned functions in bootstrap-colorpicker.js:
-
-
-
-
- sliders: {
- saturation: {
- maxLeft: 200,
- maxTop: 200,
- callLeft: 'setSaturationRatio',
- callTop: 'setBrightnessRatio'
- },
- hue: {
- maxLeft: 0,
- maxTop: 200,
- callLeft: false,
- callTop: 'setHueRatio'
- },
- alpha: {
- maxLeft: 0,
- maxTop: 200,
- callLeft: false,
- callTop: 'setAlphaRatio'
- }
- },
-
-
-
-
- slidersHorz: {
- saturation: {
- maxLeft: 200,
- maxTop: 200,
- callLeft: 'setSaturationRatio',
- callTop: 'setBrightnessRatio'
- },
- hue: {
- maxLeft: 200,
- maxTop: 0,
- callLeft: 'setHueRatio',
- callTop: false
- },
- alpha: {
- maxLeft: 200,
- maxTop: 0,
- callLeft: 'setAlphaRatio',
- callTop: false
- }
- }