Many of you want to use the wordpress color picker like in the header editor of the wordpress. Don’t worry today i will let you know how to do it. I have created a sample plugin which just display the color picker inside it. The code is really simple to implement. WordPress uses “farbtastic” script for the color picker. To include the “farbtastic” javascript we need to call wp_enqueue_script(‘farbtastic’); at the time of wordpress initialization and similarly wp_enqueue_style(‘farbtastic’); for style.
Below is the sample plugin code. To test it just copy the code and paste it in a Php file and then make a zip of this file. Now you can install it like normal wordpress plugins. 🙂

Leave a Reply