Skip to content

Instantly share code, notes, and snippets.

@zgordon
Last active January 7, 2024 05:16
Show Gist options
  • Save zgordon/de5680f37b5242c5f4837c33b4dd527e to your computer and use it in GitHub Desktop.
Save zgordon/de5680f37b5242c5f4837c33b4dd527e to your computer and use it in GitHub Desktop.
Add theme support and set a color palette for all blocks
<?php
function mytheme_setup_theme_supported_features() {
add_theme_support( 'editor-color-palette',
'#556270',
'#4ECDC4',
'#C7F464',
'#FF6B6B',
'#C44D58',
);
}
add_action( 'after_setup_theme', 'mytheme_setup_theme_supported_features' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment