Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress Block Editor Color Palette
add_action( 'after_setup_theme', function() {
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'one' ),
'slug' => 'one',
'color' => '#000000',
),
array(
'name' => __( 'two' ),
'slug' => 'two',
'color' => '#000000',
),
array(
'name' => __( 'three' ),
'slug' => 'three',
'color' => '#000000',
),
array(
'name' => __( 'four' ),
'slug' => 'four',
'color' => '#000000',
),
array(
'name' => __( 'five' ),
'slug' => 'five',
'color' => '#000000',
),
array(
'name' => __( 'six' ),
'slug' => 'six',
'color' => '#000000',
),
) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment