The color-palette control allows you to define an array of colors and users can choose from those colors. Internally the control is a simple radio control with some additional styling to make color selection easier.

You can define inside the choices arguments an array of colors, the style (round or not) and also the size each color will have. See the examples below.

Example

Kirki::add_field('theme_config_id',['type'=>'color-palette','settings'=>'color_palette_setting_0','label'=>esc_html__('Color-Palette','kirki'),'description'=>esc_html__('This is a color-palette control','kirki'),'section'=>'section_id','default'=>'#888888','choices'=>['colors'=>['#000000','#222222','#444444','#666666','#888888','#aaaaaa','#cccccc','#eeeeee','#ffffff'],'style'=>'round',],]);

Licence

Kirki is licenced under the MIT Licence. It is 100% open-souce and you can use it on your projects.

Though not legally necessary, we would appreciate if you mention in your project's page that use Kirki and link to this project.

Support

Support is provided from the github repository. Though we do our best to reply to everyone in a timely manner and address any questions or issues you might have, keep in mind that Kirki is an open-source project maintained by people donating hundreds of hours.