Using color schemes with Color Picker

Don’t save everything as individual options, save all of your options as an array under a single key. One query to load it and save it, then just do all your manipulation in php. example structure and output: $colors = array( ‘current_scheme’ => ‘user_scheme’, ‘preset_schemes’ => array( ‘red’ => array( ‘menu’ => ‘#CC0000’, ‘footer’ => … Read more

Using WP Color Picker in Repeatable Fields

It’s hard to know for sure, since you don’t include the markup you’re output for the metabox nor the JS you’re using to clone. But, the following simplified setup seems to work for me: metabox markup <label for=”my_field”> My Color Picker Field </label> <input name=”my_field” id=’my_field’ type=”text” class=”my-colorpicker” /> <a href=”#” class=”clone-it”>Add Another Color Picker</a> … Read more

How to add more default colors?

You should be able to add more colors using the add_theme_support function as per the docs here add_theme_support( ‘editor-color-palette’, array( array( ‘name’ => __( ‘strong magenta’, ‘themeLangDomain’ ), ‘slug’ => ‘strong-magenta’, ‘color’ => ‘#a156b4’, ), array( ‘name’ => __( ‘light grayish magenta’, ‘themeLangDomain’ ), ‘slug’ => ‘light-grayish-magenta’, ‘color’ => ‘#d0a5db’, ), array( ‘name’ => __( … Read more