Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change the Gutenberg Color Palette
<?php
add_action( 'after_setup_theme', 'vmf_gutenberg_color_palette' );
function vmf_gutenberg_color_palette() {
add_theme_support(
'editor-color-palette', array(
array(
'name' => esc_html__( 'Pale pink', '@@textdomain' ),
'slug' => 'pale-pink',
'color' => '#f78da7',
),
array(
'name' => esc_html__( 'Vivid Red', '@@textdomain' ),
'slug' => 'vivid-red',
'color' => '#ff0000',
),
array(
'name' => esc_html__( 'Luminous vivid orange', '@@textdomain' ),
'slug' => 'luminous-vivid-orange',
'color' => '#ff6900',
),
array(
'name' => esc_html__( 'Luminous vivid amber', '@@textdomain' ),
'slug' => 'luminous-vivid-amber',
'color' => '#fcb900',
),
array(
'name' => esc_html__( 'Light green cyan', '@@textdomain' ),
'slug' => 'light-green-cyan',
'color' => '#7bdcb5',
),
array(
'name' => esc_html__( 'Vivid green cyan', '@@textdomain' ),
'slug' => 'vivid-green-cyan',
'color' => '#00d084',
),
array(
'name' => esc_html__( 'Pale cyan blue', '@@textdomain' ),
'slug' => 'pale-cyan-blue',
'color' => '#8ed1fc',
),
array(
'name' => esc_html__( 'Vivid cyan blue', '@@textdomain' ),
'slug' => 'vivid-cyan-blue',
'color' => '#0693e3',
),
array(
'name' => esc_html__( 'Very light gray', '@@textdomain' ),
'slug' => 'very-light-gray',
'color' => '#eeeeee',
),
array(
'name' => esc_html__( 'Cyan bluish gray', '@@textdomain' ),
'slug' => 'cyan-bluish-gray',
'color' => '#abb8c3',
),
array(
'name' => esc_html__( 'Very dark gray', '@@textdomain' ),
'slug' => 'very-dark-gray',
'color' => '#313131',
),
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment