Events

Using the different Bootstrap Colorpicker events is the best way to react to any colorpicker action. Check the full list of events.
In all events, the first argument passed to the event handlers (the event) contains the colorpicker, color objects, as well as the value, representing the color string.

Playing with events and the ColorItem object

This example listens to the colorpickerChange and colorpickerCreate events and changes the background color of the parent element using the complementary color of the selected one. This also shows how to use the ColorItem object.

Using events with a custom template element

This example shows how to use a custom template with an input inside, that is able to set the color.