Custom editor color palette colors are not appearing in the editor
Below is the function to add my custom colors, the 'disable-custom-colors' is working properly, but the custom colors that I'm trying to add are not appearing in the editor. I have also tried clearing my cache and the issue persists.
function add_custom_gutenberg_color_palette() {
add_theme_support( 'disable-custom-colors' );
add_theme_support(
'editor-color-palette',
array(
array(
'name' = esc_html__('Red', 'twentytwentyone-child'),
'slug' = 'red',
'color' = '#E4D1D1',
),
array(
'name' = esc_html__('Orange', 'twentytwentyone-child'),
'slug' = 'orange',
'color' = '#E4DAD1',
)
)
);
}
add_action( 'after_setup_theme', 'add_custom_gutenberg_color_palette' );
Thank you for the help!
Topic block-editor color-picker functions Wordpress
Category Web