mirror of
https://github.com/PitPik/colorPicker.git
synced 2025-07-31 13:54:30 -06:00
support for custom background
This commit is contained in:
parent
21c6f1aec9
commit
3fd3a6443d
@ -30,7 +30,7 @@ Calling the colorPicker on all inputs with the calssName 'color': <pre>$('input.
|
|||||||
|
|
||||||
<script type="text/javascript" src="jqColor.js"></script>
|
<script type="text/javascript" src="jqColor.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var $colors = $('input.color').colorPicker().each(function(idx, elm) { // {multipleInstances: true}
|
var $colors = $('input.color').colorPicker({customBG: '#222'}).each(function(idx, elm) { // {multipleInstances: true}
|
||||||
$(elm).css({'background-color': this.value})
|
$(elm).css({'background-color': this.value})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
colorMode = $input.data('colorMode');
|
colorMode = $input.data('colorMode');
|
||||||
|
|
||||||
$patch.css({
|
$patch.css({
|
||||||
'color': (colors.rgbaMixBlack.luminance > 0.22 ? '#222' : '#ddd'), // Black...???
|
'color': (colors.rgbaMixCustom.luminance > 0.22 ? '#222' : '#ddd'), // Black...???
|
||||||
'background-color': RGBAText,
|
'background-color': RGBAText,
|
||||||
'filter' : (options.isIE8 ? 'progid:DXImageTransform.Microsoft.gradient(' + // IE<9
|
'filter' : (options.isIE8 ? 'progid:DXImageTransform.Microsoft.gradient(' + // IE<9
|
||||||
'startColorstr=#' + AHEX + ',' + 'endColorstr=#' + AHEX + ')' : '')
|
'startColorstr=#' + AHEX + ',' + 'endColorstr=#' + AHEX + ')' : '')
|
||||||
@ -72,6 +72,7 @@
|
|||||||
animationSpeed: 200,
|
animationSpeed: 200,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
margin: {left: -1, top: 2},
|
margin: {left: -1, top: 2},
|
||||||
|
customBG: '#FFFFFF',
|
||||||
// displayCallback: displayCallback,
|
// displayCallback: displayCallback,
|
||||||
/* --- regular colorPicker options from this point --- */
|
/* --- regular colorPicker options from this point --- */
|
||||||
color: elm.value,
|
color: elm.value,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user