Created
May 17, 2021 07:37
-
-
Save aaronsummers/935017e7ee7b50f4f59117b02629fede to your computer and use it in GitHub Desktop.
Guttenburg - Add custom colours
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** ANCHOR Custom colours for Gutenberg editor */ | |
/** Blue colours **/ | |
.has-blue-background-color { | |
background-color: #009aa9; | |
} | |
.has-blue-color { | |
color: #009aa9; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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