
Define a custom block editor color palette that reflects your website’s branding.
Add the following example to functions.php and replace the sample colors, names, and slugs with those used by your theme:
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Navy', 'my-site' ),
'slug' => 'navy',
'color' => '#0c3954',
),
array(
'name' => __( 'Gold', 'my-site' ),
'slug' => 'gold',
'color' => '#fdbc1d',
),
array(
'name' => __( 'White', 'my-site' ),
'slug' => 'white',
'color' => '#ffffff',
),
array(
'name' => __( 'Black', 'my-site' ),
'slug' => 'black',
'color' => '#000000',
),
) );