Make WordPress Core

Opened 2 days ago

Last modified 2 days ago

#66890 assigned enhancement

Administration: Align the admin color schemes with the editor sidebar

Reported by: mciampini Owned by: mciampini
Priority: normal Milestone: Awaiting Review
Component: Administration Version:
Severity: normal Keywords: has-patch
Cc: Focuses: ui, accessibility, css

Description (last modified by mciampini)

Gutenberg ​#87673 changed the editor sidebar and accent colors for the Modern, Fresh, Midnight, and Ectoplasm admin color schemes. Core's admin menu and admin bar still use the old colors, so they no longer match the editor once Core pulls in that Gutenberg change.

The linked PR updates every Core admin color scheme to the colors Gutenberg now uses for the sidebar and accent:

Scheme Menu background Menu highlight
Modern #1e1e1e → #070a09 #3858e9 (unchanged)
Fresh #1d2327 → #070b0d #2271b1 → #006daa
Midnight #333c42 → #06080a #cf4339 → #bf332b
Ectoplasm #4a3369 → #523f6d #646c3e → #606e00
Blue #245278 → #215177 unchanged
Coffee #5c4c40 → #574b42 unchanged
Light #e5e5e5 → #e1e5e4 unchanged
Ocean #39535a → #375158 unchanged
Sunrise #8a312d → #892e2b unchanged

Other changes:

  • Fresh's colors are hardcoded in the base CSS, so links, page title buttons, admin pointers, and the TinyMCE menu change from #2271b1 to #006daa where the other schemes override them.
  • Ectoplasm submenu text is lighter (#dcd9e2), and focus rings use #455100, so both keep enough contrast against the new colors.
  • The color previews on the profile screen show the new colors.

Known limitations:

  • Modern, Fresh, and Midnight become near-black and look alike. Gutenberg has the same limitation.
  • The front-end admin bar always uses the Fresh colors from admin-bar.css, so it becomes #070b0d for every logged-in user, whatever their scheme.

Buttons and focus rings use --wp-admin-theme-color from the Gutenberg base-styles package. They get the new Fresh, Midnight, and Ectoplasm accents when Core's pinned Gutenberg commit moves past ​9917665e52, so this change should be committed in step with that update.

Follow-up to [62454] / #65382.

PR with before and after screenshots: ​https://github.com/WordPress/wordpress-develop/pull/16348

Change History (2)

This ticket was mentioned in ​PR #16348 on ​WordPress/wordpress-develop by ​@mciampini.


2 days ago
#1

  • Keywords has-unit-tests added

Follow-up to ​https://github.com/WordPress/gutenberg/pull/87673 and [62454] (#65382).

Gutenberg #87673 changes the editor sidebar and accent colors for the Modern, Fresh, Midnight, and Ectoplasm admin color schemes. Until Core changes too, the classic admin menu and the admin bar keep the old colors and no longer match the editor. This PR updates every Core scheme to the sidebar colors and accents that Gutenberg ships on trunk since that PR merged (9917665e52).

Scheme Menu background Menu highlight Notes
Modern #1e1e1e → #070a09 #3858e9 (unchanged) Submenu #1a1d1c
Fresh #1d2327 → #070b0d #2271b1 → #006daa Submenu #2c3338 → #1a1e21
Midnight #333c42 → #06080a #cf4339 → #bf332b Submenu #191d1f
Ectoplasm #4a3369 → #523f6d #646c3e → #606e00 Lighter submenu text, #455100 focus rings
Blue #245278 → #215177 unchanged
Coffee #5c4c40 → #574b42 unchanged
Light #e5e5e5 → #e1e5e4 unchanged
Ocean #39535a → #375158 unchanged
Sunrise #8a312d → #892e2b unchanged

Each menu background is the --wpds-color-background-surface-neutral-weak value that @wordpress/theme computes from the scheme's seed colors. Each highlight matches the scheme's --wp-admin-theme-color in @wordpress/base-styles. The color previews on the profile screen follow the new values.

Known limitations

  • Modern, Fresh, and Midnight become near-black and look alike. The Gutenberg PR has the same limitation.
  • The front-end admin bar always uses the Fresh colors from admin-bar.css, so it also becomes #070b0d for every user.
  • Buttons, focus rings, and other --wp-admin-theme-color uses get the new Fresh (#006daa), Midnight (#bf332b), and Ectoplasm (#606e00) accents only when Core syncs the Gutenberg packages. Until then they keep the old accents, as the Ectoplasm screenshot shows. This PR should land with that sync.

Screenshots

Posts screen, with the Pages flyout open, at 1280 × 800 (2x). Before is trunk at d3efc0b16b. After is this PR. Core's Gutenberg packages are not synced yet, so content-area buttons keep the old accents.

Before After
https://github.com/user-attachments/assets/4198e30d-3cbf-44a9-bb95-a6789739a9a3 https://github.com/user-attachments/assets/f1d1e128-fc96-48db-8d6d-788cc4316698
https://github.com/user-attachments/assets/4affba81-3fa8-46fe-9571-11d14e9a7c38 https://github.com/user-attachments/assets/23d58788-b41d-404b-a274-d5827ab7b986

<details>
<summary>Fresh and Midnight</summary>

Before After
https://github.com/user-attachments/assets/923e1470-982c-4529-8dd7-b531a775dac5 https://github.com/user-attachments/assets/cc8de82a-0ae2-45db-b6c4-d983001ddcb9
https://github.com/user-attachments/assets/e4edfd41-b7b0-48eb-a41a-61a53d513783 https://github.com/user-attachments/assets/1435c238-2d10-4395-855e-4203ad39ada3

</details>

<details>
<summary>Blue, Coffee, Light, Ocean, and Sunrise (small shifts)</summary>

Before After
https://github.com/user-attachments/assets/de8d764d-9f27-4123-8bcc-56fa515f3bec https://github.com/user-attachments/assets/7858562c-3f39-4883-824b-2b19adc77654
https://github.com/user-attachments/assets/5dca1191-fa00-4339-b50a-ba11fdff3835 https://github.com/user-attachments/assets/4a7be9cc-d118-4dfe-97b8-1f4c75a117ad
https://github.com/user-attachments/assets/a8b6e106-5de0-4ea6-8087-34a3b2c3cddf https://github.com/user-attachments/assets/c6465cf2-24c8-408a-a1af-d0ce398664d8
https://github.com/user-attachments/assets/94f591a2-150f-4062-bc31-5673bac0bfad https://github.com/user-attachments/assets/cd17ab83-66bd-41b4-a580-7a794e8a1b53
https://github.com/user-attachments/assets/5c5767ed-727e-4da3-9dc1-17c2be448a95 https://github.com/user-attachments/assets/0524a73e-5b0a-42cf-a4f0-46960882dcff

</details>

<details>
<summary>Profile color previews and the front-end admin bar</summary>

Before After
https://github.com/user-attachments/assets/7294b589-a250-414d-ab80-a4f80ef9599e https://github.com/user-attachments/assets/2b2e131e-aeab-41c0-b085-11f61c004262
https://github.com/user-attachments/assets/c0f52c75-ec46-414d-a7b0-121e09284e80 https://github.com/user-attachments/assets/93c12f2c-45ff-4eab-a672-14d61d2990d9

</details>

<details>
<summary>Implementation notes</summary>

  • Fresh. Fresh has no Sass scheme, because its colors are the defaults in the admin stylesheets. This PR changes only the rules whose role the Sass schemes override in _admin.scss, such as the menu, admin bar, links, pointers, and the TinyMCE menu selection. Other uses of #2271b1 and #1d2327 apply to every scheme, so they stay unchanged. The darker Fresh shades follow Gutenberg's Fresh tokens: #135e96 → #005e9a and #0a4b78 → #004e89.
  • Modern and Midnight submenus. The default $menu-submenu-background darkens the base color by 7%. On a near-black base, Sass outputs an invalid negative lightness, for example hsl(210, 25%, -3.86%). These schemes now set the submenu background to Gutenberg's popup surface, as Fresh does.
  • Ectoplasm submenu text. The derived submenu text drops to 4.05:1 on the toolbar's secondary submenu with the new base. #dcd9e2 keeps it at 4.91:1.
  • Ectoplasm button color. Some focus rings use $button-color lightened by 10%. With #606e00, those rings fall to 2.55:1 on light backgrounds. Gutenberg's darker Ectoplasm stroke color, #455100, keeps them at 3.69:1.
  • Fresh secondary toolbar submenu. It uses Gutenberg's Fresh surface #2e3336, so its #72aee6 links reach 5.42:1 (4.26:1 on trunk).
  • Swatches. Midnight's swatch drops its darker shade, because a shade darker than #06080a is not visible. In the other schemes, the darker shade keeps its previous ratio to the base color.

</details>

Testing Instructions

  1. Go to Users → Profile and set Administration Color Scheme to Default (Modern).
  2. Check that the admin menu and the admin bar are near-black (#070a09). Hover Pages, and check that the flyout is a lighter gray (#1a1d1c). The current menu item stays blue with a white label.
  3. Repeat for Fresh and Midnight. In Fresh, the current menu item and links are #006daa. In Midnight, the current menu item is #bf332b.
  4. Select Ectoplasm. The menu is purple (#523f6d), and the current menu item is dark lime (#606e00) with a white label. Hover the WordPress logo in the admin bar, and check that Documentation and the other secondary links are readable.
  5. Select Blue, Coffee, Light, Ocean, and Sunrise. Check that each menu color is nearly unchanged.
  6. In Users → Profile, check that the color previews match the new menu colors.

Testing Instructions for Keyboard

In each scheme, press <kbd>Tab</kbd> through the admin menu and the admin bar. Check that focused and current menu items stay readable, and that flyout submenus open with visible focus.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code, Codex
Model(s): Claude Opus 5.5, GPT-6.2 Sol
Used for: Computing the scheme colors with Gutenberg's ramp code, drafting the code changes and this description, capturing screenshots, and independent code review. The PR author reviews the result before it leaves draft.

---
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.

🤖 Generated with ​Claude Code

#2 @mciampini
2 days ago

  • Description modified (diff)
  • Keywords has-unit-tests removed
  • Owner set to mciampini
Note: See TracTickets for help on using tickets.