WP 3.5 Color Picker

Previously when working on wordpress themes / plugin, had to use external or farbtastic’s color picker. Now in 3.5 WP comes with a shiney Iris color picker that looks really nice.

Just enqueue the scripts using “admin_enqueue_scripts”


wp_enqueue_script('wp-color-picker');
wp_enqueue_style('wp-color-picker');

and use

jQuery("#fieldID").wpColorPicker();

and it should look something like this

colorpicker

and upon clicked.

colorpicker_expanded

Leave a Reply

"Life is like a camera. Focus only on what is important and you will capture it perfectly."