diff --git a/README.md b/README.md index bdd0729..33b3b39 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,17 @@ Color Picker will use the value of the input field, which the picker is attached **Color Palette** -Overrides the default color palette by passing an array of color values. +Overrides the default color palette by passing an array of color values or an array of color objects with `name` and `hex` properties. ```javascript $('#color1').colorPicker({colors: ["333333", "111111"]}); ``` +_or_ + + ```javascript + $('#color1').colorPicker({colors: [{name: "Asphault", hex: "333333"}, {name: "White as Snow", hex:"ffffff"}]}); + ``` + **Transparency** @@ -67,7 +73,7 @@ Enable transparency value as an option. Registers a callback that can be used to notify the calling code of a color change. ```javascript - $('#color1').colorPicker( { onColorChange : function(id, newValue) { console.log("ID: " + id + " has been changed to " + newValue); } } ); + $('#color1').colorPicker( { onColorChange : function(id, newHexValue, newColorName) { console.log("ID: " + id + " has been changed to " + newValue); } } ); ``` If you want to set an option gloablly (to apply for all color pickers), use: @@ -90,6 +96,7 @@ Let us know how you are using Really Simple Color Picker... * Lakshan Perera - http://laktek.com * Daniel Lacy - http://daniellacy.com +* Ross Brown - http://rossisbrown.com ### Issues & Suggestions diff --git a/demo.html b/demo.html index 5937e04..857a68c 100644 --- a/demo.html +++ b/demo.html @@ -7,19 +7,44 @@ - +