value

value - Specifies the color value of the ColorPicker widget.


<input id="colorpicker" type="color" />

<script type="text/javascript">

     $(function () {
        $("#colorpicker").shieldColorPicker({
           palette: "advanced",
           value: "#f23210"
        });
     });

</script>

The value can be set in a different formats:

  • hex - "#33cc00"
  • css rgb - "rgb(51,204,0)"
  • cssa rgb - "rgba(51,204,0,1)"

<input id="colorpicker" type="color" />

<script type="text/javascript">

     $(function () {
        $("#colorpicker").shieldColorPicker({
           palette: "advanced",
           value: "rgba(51,204,0,1)"
        });
     });

</script>