Admin color schemes: make sidebars compatible with Gutenberg editor chrome by improving contrast#12026
Admin color schemes: make sidebars compatible with Gutenberg editor chrome by improving contrast#12026fushar wants to merge 1 commit into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
89536e4 to
a72c0d5
Compare
a72c0d5 to
1dc74e4
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
I didn't test yet but adding a note to test non-site-editor pages built with WP Build; Fonts, Connectors, etc. |
Yep, this is addressed in the Gutenberg PR WordPress/gutenberg#78397. Together with that PR, this PR even fixes an existing bug with "disconnected" black chrome surrounding such pages. Copying here for easy reference:
|


Trac ticket: https://core.trac.wordpress.org/ticket/65382
Summary
The block editor and Site Editor are moving toward applying the user's admin color scheme (see WordPress/gutenberg#78397). With that, the editor chrome will use the color scheme, instead of being always black. However, as also discussed in the linked PR, this has a few problems with the current color schemes:
Review X changes...button. So, the background color should be distinct enough from the sidebar. Currently several schemes have similar colors (e.g. the purple Ectoplasm).This PR updates the core admin color schemes to satisfy both, while maintaining each scheme's characteristics.
Several notes:
buildBgRamp()function CANNOT produce low-contrast colors. So, for each such schemes (like Coffee, Ocean) I tried to produce the color with the lowest contrast possible while still being similar to the original color.Warning
The linked Gutenberg PR must also be backported, because the primary colors are also being updated in
base-styles.Sidebar contrast (white/black text vs sidebar background)
And whether they pass WCAG 2.x AA (it requires > 4.5:1 for normal text)
Primary button contrast (white text vs button background)
Note that except for Light scheme, this primary button background color is now equal to that of the currently selected menu item.
Screenshots
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 4.7-4.8
Used for: iterating the color gradients
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.