Add full Gutenberg colors support.

This commit is contained in:
Caroline Moore 2018-11-05 10:55:31 -05:00
parent 46b5b4c1a4
commit 1919884e00
2 changed files with 43 additions and 2 deletions

View file

@ -533,14 +533,14 @@ hr.wp-block-separator {
.has-dark-red-color:hover,
.has-dark-red-color:focus,
.has-dark-red-color:active {
color: #0c8384;
color: #b44738;
}
.has-dark-red-background-color,
.has-dark-red-background-color:hover,
.has-dark-red-background-color:focus,
.has-dark-red-background-color:active {
background-color: #0c8384;
background-color: #b44738;
}
.has-black-color,

View file

@ -65,6 +65,47 @@ function illustratr_setup() {
*/
add_theme_support( 'responsive-embeds' );
// Add custom colors to Gutenberg
add_theme_support(
'editor-color-palette', array(
array(
'name' => esc_html__( 'Black', 'illustratr' ),
'slug' => 'black',
'color' => '#24282d',
),
array(
'name' => esc_html__( 'Dark Gray', 'illustratr' ),
'slug' => 'dark-gray',
'color' => '#464d4d',
),
array(
'name' => esc_html__( 'Medium Gray', 'illustratr' ),
'slug' => 'medium-gray',
'color' => '#7f8d8c',
),
array(
'name' => esc_html__( 'Light Gray', 'illustratr' ),
'slug' => 'light-gray',
'color' => '#f1f2f3',
),
array(
'name' => esc_html__( 'White', 'illustratr' ),
'slug' => 'white',
'color' => '#ffffff',
),
array(
'name' => esc_html__( 'Red', 'illustratr' ),
'slug' => 'red',
'color' => '#e06d5e',
),
array(
'name' => esc_html__( 'Dark Red', 'illustratr' ),
'slug' => 'dark-red',
'color' => '#b44738',
)
)
);
/*
* Enable support for Post Thumbnails on posts and pages.
*