Created
May 7, 2022 20:38
-
-
Save chris-castillo-dev/ffb03868491d83c71ed09f9817768d70 to your computer and use it in GitHub Desktop.
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
/** | |
* Populate Gutenberg Color Palette Colors | |
*/ | |
function pro_populate_gutenberg_color_palette() { | |
// Disable Custom Colors | |
add_theme_support( 'disable-custom-colors' ); | |
// Editor Color Palette | |
add_theme_support( 'editor-color-palette', array( | |
array( | |
'name' => __( 'Brand 1', 'pro-theme-1' ), | |
'slug' => 'pro-theme-brand-1', | |
'color' => '#153840', | |
), | |
array( | |
'name' => __( 'Brand 2', 'pro-theme-1' ), | |
'slug' => 'pro-theme-brand-2', | |
'color' => '#c4e1de', | |
), | |
array( | |
'name' => __( 'Brand 3', 'pro-theme-1' ), | |
'slug' => 'pro-theme-brand-3', | |
'color' => '#bb8b3b', | |
), | |
array( | |
'name' => __( 'Light 1', 'pro-theme-1' ), | |
'slug' => 'pro-theme-light-1', | |
'color' => '#c4e1de', | |
), | |
array( | |
'name' => __( 'Light 2', 'pro-theme-1' ), | |
'slug' => 'pro-theme-light-2', | |
'color' => '#e1f0ee', | |
) | |
) ); | |
} | |
add_action( 'after_setup_theme', 'pro_populate_gutenberg_color_palette' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment