Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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/
<?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
You can’t perform that action at this time.