Themes can declare custom color palettes giving the publisher specific options to choose from. This is done through a multidimensional array.
- [Instructor] Some blocks, like the paragraph block…you see here inside a column's block, allow for color…customization of the text color and the background color.…This is all controlled from the block properties panel…on the right hand side under color settings.…Out of the box, the block editor provides a selection…of prepackaged colors, as well as a custom color option,…that lets the user select any color they want.…As a theme designer or developer, there's a good chance…you have opinions about what colors work and don't work…for your theme, and you may want to provide the theme user…with a custom color palette or selection of specific colors…to use instead of this random assortment you see here.…
The good news is your theme can be extended…with custom color support, where you define…your own colors and give them names.…This is done by adding editor color palette theme support.…Just like before, this is added in the theme setup function…inside functions.php.…I've added the code in here already,…and just commented it out, because it's quite verbose.…
- Declaring support for default block styles
- Adding support and styles for wide alignment
- Supporting theme-specific colors and fonts
- Extending block styles
- Adding new style variations