Open paaljoachim opened 3 years ago
Looking at the code starting by https://github.com/WordPress/wordpress-develop/blob/master/src/wp-includes/theme.php#L3689, it doesn't seem like this feature exists.
May worth opening a feature request on Trac
I assume you mean a feature request issue here on the Gutenberg repo.
Huh 🤔, I guess we will need to register features for text color palette and background color palette and initialize the editor with it: https://gist.github.com/3a7cfd18695133af58d207bebbf0100f.git. This should normally happen on Trac.
Justin, I think Paal (and the original question) were looking for documentation on how a user might set default colors using the block editor not for the documentation site. The snippet of code you included is correct, here is the documentation page for color palettes.
I think it still requires effort made on the theme side and not yet possible for a user to switch the defaults globally. So I'm not positive it is just a documentation issue. I've tagged it global styles and we can let someone from that team respond, there is also likely already a ticket for this somewhere.
Ahhh..... Yes. I was talking about the Gutenberg plugin support question: https://wordpress.org/support/topic/defining-separate-colors-for-backgrounds-and-text/
"In the theme 2021, functions.PHP adds support for editor-color-palette as well as editor-gradient-presets. Is there a way to specify defaults for text colors separate from background colors? I want to define an array of text colors and a different array of background colors."
I would love to be able to set two separate palettes for the 'Text Color' and 'Background Color' color settings. Is that what this ticket is tracking? I can't quite figure out what's going on in this ticket or the linked 'custom colors' ticket (#6941). Has there been any movement on this feature?
Hey @matthewmcvickar
I mentioned this:
Is there a way to specify defaults for text colors separate from background colors?
I found the initial support request intriguing. As it feels natural to have one color palette for the text colors and another set of colors - color palette for the background color. I noticed you linked in: Core Component: Allow Saving Custom Colors to the Color Palette https://github.com/WordPress/gutenberg/issues/6941 I also noticed that 6941 links in many other issues as well.
I assume that this issue actually can be closed, as it is still a feature that needs to be worked on, and when merged it will be natural to extend the color palettes documentation.
I have been digging into the button block code for a few hours now to figure out if it is in any way possible to alter or remove the background color palette while leaving the text color palette alone, and I'm just not seeing a viable path. Maybe I'm missing something obvious, but I don't think this is about documentation, and I don't think this issue should be closed.
Hey @cr0ybot
I made this issue: Allow Saving Custom Colors to the unique Color Palette for color og background (Might need to be renamed) https://github.com/WordPress/gutenberg/issues/34445
I updated the ticket to clarify that it is not just a documentation change but a feature to allow for specifying a palette is specific for background only colors, or text only colors.
A came across this Issue while trying to find a way to specify a palette specific to link colors. We would like our editors see Blue in the palette for link colors, but not for text and background colors.
Being able to show different default colors for text and background separately.
The question came up here: Defining separate colors for backgrounds and text
https://wordpress.org/support/topic/defining-separate-colors-for-backgrounds-and-text/