Last active
October 14, 2019 09:57
-
-
Save mishterk/2ffa3384a8640113e30547719f1a066e to your computer and use it in GitHub Desktop.
How to define custom colour palette for Gutenberg; the new WordPress block editor. More info see https://philkurth.com.au/tips/how-to-customize-the-colour-palette-for-wordpress-gutenberg-block-editor/
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 | |
add_action( 'after_setup_theme', function () { | |
add_theme_support( 'editor-color-palette', [ | |
[ | |
'name' => 'Purple', | |
'slug' => 'purple', | |
'color' => '#2B265C' | |
], | |
[ | |
'name' => 'Mauve', | |
'slug' => 'mauve', | |
'color' => '#915099' | |
], | |
[ | |
'name' => 'Charcoal', | |
'slug' => 'charcoal', | |
'color' => '#222222' | |
], | |
] ); | |
} ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment