Он сохраняется в аргументе hex
, включенном в событие onchange.Тот , который вы уже используете.
$('#colourPicker').ColorPicker({
onChange: function(hsb, hex, rgb) {
// communicate with server here, probably with $.ajax
// and save the hex argument.
// Alternatively, you could set the value of a hidden input
// here and submit a form afterward.
$("#full").css("background-color", '#' + hex);
}
});
Пример установки скрытого значения ввода
HTML
<input id="hiddenHex" name="hiddenHex" type="hidden" value="" />
JS / jQuery
$('#hiddenHex').val(hex);