Skip to content

Instantly share code, notes, and snippets.

@aaronsummers
Created May 17, 2021 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronsummers/935017e7ee7b50f4f59117b02629fede to your computer and use it in GitHub Desktop.
Save aaronsummers/935017e7ee7b50f4f59117b02629fede to your computer and use it in GitHub Desktop.
Guttenburg - Add custom colours
/** ANCHOR Custom colours for Gutenberg editor */
/** Blue colours **/
.has-blue-background-color {
background-color: #009aa9;
}
.has-blue-color {
color: #009aa9;
}
<?php
function elab_guttenburg_colours() {
// Disable Custom Colors
add_theme_support( 'disable-custom-colors' );
// Editor Color Palette
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Blue', 'elab' ),
'slug' => 'blue',
'color' => '#009aa9',
)
) );
}
add_action( 'after_setup_theme', 'elab_guttenburg_colours' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment