Custom Color Palette for Core Blocks #14110
Labels
[Feature] Block API
API that allows to express the block paradigm.
[Feature] Extensibility
The ability to extend blocks or the editing experience
[Type] Enhancement
A suggestion for improvement.
Is your feature request related to a problem? Please describe.
I can define a global color palette, but I don't want all of those colors being available for every block. I may define 5-6 colors for a theme, but I only want the button to use 1-2 colors. Or maybe I just want to define 2 styles of button that handle the colors, and remove the color panel completely. We can currently register/unregister styles for core blocks, so would like to also see something similar with colors.
Describe the solution you'd like
I believe there are currently 6 blocks that utilize the PanelColorSettings component:
A register/unregister color functionality similar to block styles could be a solution.
Or if we passed down a "customColors" property to the
PanelColorSettings
's "colors" property, then we could modify the blocks with the editor.BlockEdit hook. The filter solution seems to work for me locally (and gives me the ability to remove the panel with a falsy value), but it seems like there would be a more elegant solution than adding a new property to each block'sPanelColorSettings
component.Describe alternatives you've considered
Since we can edit styles for each block and we can edit colors globally, it seems like this would make sense as a new feature to sort of combine the two, but there could be more to the issue than I'm considering.
The text was updated successfully, but these errors were encountered: