Repository navigation
Admin UI: Restore the Sunrise and Blue sidebar colors - #87420
Conversation
Since the background ramp preserves saturation, the Sunrise and Blue background seeds derive sidebar colors that drift from Core's `$base-color` (#99171c instead of #8a312d, #11507e instead of #245278). New seeds bring both back within a visually indistinguishable distance and leave the primary ramps unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.72 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. As a user I want to be able to add multiple close buttons so that users can close the overlay from different positions in
|
|
The other possible approach is to tweak the Code (ie wp-develop) side of things to match the new Gutenberg generated colors, I guess that's more of an art direction decision. If we like that approach, we'd need to understand if it still makes sense to land this PR anyway to prevent that little color difference between backgrounds cc @fushar @WordPress/gutenberg-design |
Move the sidebar color check from the theme ramp tests, which supplied their own seeds, to a browser test that reads the seeds from getAdminThemeColors. Restore the original Blue rounding fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Render the layout class in the sidebar color test so it exercises the production stylesheet, note that the Core colors are those of WordPress 7.1, and label the former Blue rounding fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This seems the less impactful approach which suggests it's the right one to me. The core admin themes could use an overhaul once wp-admin has fully adopted the DS tokens. |
|
I agree, I propose we:
The alternative, more complex but also "correct" approach would be to eventually consume WPDS tokens in Core, but we don't yet have a straight path there, I believe. |
|
I don't have a strong opinion on how we do in the interim, but I see the destination as one where we have a single unifid colour token system that is applied to editor and admin, one that allows you to set an accent colour, light or dark mode, and add some customisation into the mix. Arguably the theme provider already does this, so a first step is to expand its usage to the admin itself. But notably, such a future revisits all the existing themes as far as how they are made, so rather than being bespoke stylesheets that override, are simply value changes instead. All that should be possible, perhaps with the only question being whether the greyscale can be tinted. Everything in between here is temporary, IMO. |
|
I'll go ahead and merge, since there is consensus for this "stopgap" PR to land quickly. |
Depends on #86614. This addresses its first follow-up after the saturation change in #87175.
What?
Change the Sunrise and Blue background seeds in
getAdminThemeColorsso that the site editor sidebar matches Core's admin colors again.Why?
Since #87175 keeps background saturation, the derived sidebar color has moved away from the
$base-colorof the Core scheme in WordPress 7.1 and later. Sunrise shows#99171cinstead of#8a312d. Blue shows#11507einstead of#245278. The difference is visible where the sidebar meets the admin bar.How?
The sidebar uses
--wpds-color-background-surface-neutral-weak, whichThemeProviderderives from the background seed. The new seeds are#933330(Sunrise) and#24567e(Blue). They produce#892e2band#215177, which are within ΔE2000 0.7 of Core. The ramp rounds its output, and a search of nearby seeds found no exact match. A browser test in@wordpress/bootreads the seeds throughgetAdminThemeColorsand checks the sidebar color against Core for both schemes.The seed also sets the other neutral colors in the sidebar, such as its text and strokes. They change with the background. White sidebar text keeps a contrast of about 8.4:1. On trunk, the primary ramps do not change. With #86614 applied, a few brand steps move by one hex level. The Sunrise fill changes from
#e79858to#e69858, and the Blue fill changes from#76afe0to#77afe0.The change applies to the site editor and the extensible site editor, because both read the scheme from
getAdminThemeColors. Single-page screens of the extensible admin, such as Fonts, also show this color in the frame around their content. The Storybook data for these schemes uses the new seeds.Testing Instructions
Use WordPress 7.1 or later. WordPress 7.0 still uses the older Core colors for these schemes (
#cf4944and#52accc). On 7.0, the sidebar does not match the admin bar with or without this PR.wp-admin/admin.php?page=site-editor-v2. Compare the sidebar with the admin bar above it. On trunk, the sidebar is a brighter red (#99171c). With this PR, it is close to the admin bar (#892e2bagainst#8a312d).wp-admin/site-editor.phpand compare the sidebar in the same way.#11507e. With this PR, it is#215177against#245278.Testing Instructions for Keyboard
In each scheme, press Tab from Dashboard to a navigation item. Check that its focus ring is visible against the sidebar.
Screenshots or screencast
The extensible site editor at 1280×720. The admin bar at the top uses the Core scheme color. Before is trunk (
d3f8e19). After is this PR.Sunrise
Blue
Sidebar distance from Core
ΔE2000 between the derived sidebar color and the Core
$base-color. A lower value means a closer match.#87175 did not change the sidebar background of the other schemes, and this PR does not change those schemes.
Alternative: change the Core colors
Core could instead adopt the colors that Gutenberg now derives, as an art direction decision. Core already changed these colors once to match the ramp. r62454 (Core ticket #65382) set Sunrise to
#8a312dand Blue to#245278. #87175 then changed the ramp.This PR keeps Core as the reference for these reasons:
$base-coloralso sets the admin menu and admin bar on every classic admin screen.Contrast does not favor either option. White text measures about 8.2:1 to 8.5:1 on all of these colors.
Use of AI Tools
Claude Code implemented the change, measured the seeds against Core's colors, and captured the screenshots. GPT-6.2 Astra reviewed the changes and updated the browser test.