-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify a color palette is to be used for background colors only (or text colors only) #28146
Comments
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..... "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:
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: 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. |
#6941 was closed due to the introduction of theme.json, which does not address different palettes for background vs text. 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. |
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. |
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/
The text was updated successfully, but these errors were encountered: