Skip to content

Administration: Align the admin color schemes with the editor sidebar - #16348

Draft
ciampo wants to merge 7 commits into
WordPress:trunkfrom
ciampo:t3/update-theme-colors
Draft

ciampo wants to merge 7 commits into
WordPress:trunkfrom
ciampo:t3/update-theme-colors

Conversation

@ciampo

@ciampo ciampo commented Nov 30, 2026 •

Copy link
Copy Markdown

Follow-up to WordPress/gutenberg#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.

Trac ticket: https://core.trac.wordpress.org/ticket/66890

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
Modern before: #1e1e1e menu and admin bar, blue current item Modern after: near-black #070a09 menu and admin bar, lighter gray flyout, blue current item
Ectoplasm before: #4a3369 purple menu, olive #646c3e current item Ectoplasm after: #523f6d purple menu, #606e00 lime current item with a white label
Fresh and Midnight
Before After
Fresh before: #1d2327 menu, #2271b1 current item and links Fresh after: near-black #070b0d menu, #1a1e21 flyout, #006daa current item and links
Midnight before: #333c42 menu, #cf4339 current item Midnight after: near-black #06080a menu, #191d1f flyout, #bf332b current item
Blue, Coffee, Light, Ocean, and Sunrise (small shifts)
Before After
Blue before Blue after: menu #215177
Coffee before Coffee after: menu #574b42
Light before Light after: menu #e1e5e4
Ocean before Ocean after: menu #375158
Sunrise before Sunrise after: menu #892e2b
Profile color previews and the front-end admin bar
Before After
Color scheme previews before Color scheme previews after, with the new menu colors
Front-end admin bar before: #1d2327 bar, #2c3338 New menu Front-end admin bar after: #070b0d bar, #1a1e21 New menu
Implementation notes
  • 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.

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

Update the Core admin color schemes to the colors that Gutenberg's admin UI uses as of WordPress/gutenberg#87673. The classic admin menu and the admin bar now match the editor sidebar for each scheme.

- Modern, Fresh, and Midnight use near-black sidebars, so that the primary button in the editor sidebar keeps a white label. Fresh uses `#006daa` and Midnight uses `#bf332b` as the highlight color.
- Ectoplasm goes back to its original lime menu highlight, `#a3b745`, with a dark label, on a `#513e6e` sidebar. The content-area highlight stays `#646c3e`, which matches the Ectoplasm button color from `@wordpress/base-styles`.
- Blue, Coffee, Light, Ocean, and Sunrise use the exact sidebar colors that the editor derives for them.
- Fresh has no Sass scheme, so its colors change in the default stylesheets, in the rules that the other schemes override.
- The color previews in `register_admin_color_schemes()` follow the new values.

Follow-up to [62454].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

ciampo and others added 3 commits November 30, 2026 15:52
…h colors.

- Paint Ectoplasm's SVG menu icons dark on the lime current and hover backgrounds.
- Repaint SVG menu icons in their focus color while the menu item has keyboard focus, as on hover.
- Lighten Ectoplasm's submenu text, so that toolbar secondary submenu links keep 4.5:1 contrast.
- Keep the olive highlight for Ectoplasm's `.wp-ui-text-highlight` text on the page background.
- Use the new Fresh highlight color for pointers and the TinyMCE menu selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the SVG painter's keyboard focus handling with CSS that uses the same selectors as the lime menu item background. The painter's hover color also applies to the purple toolbar, and its timing cannot follow `.opensub` or `:focus-visible`.

- Revert the SVG painter change, and keep Ectoplasm's SVG hover color light.
- Darken SVG and font menu icons on hover, with keyboard focus, while the submenu is open, and on the current item.
- Keep icons light when a menu link has focus without a lime background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plugins can supply menu icons as SVG data URIs, CSS backgrounds, or image URLs, and the SVG painter recolors only some of them. Turn every menu icon black with a CSS filter wherever the menu item background is lime, unless forced colors are active. Restore Ectoplasm's SVG painter colors to their previous values, so that toolbar icons keep their light color.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ciampo and others added 3 commits November 30, 2026 16:52
Gutenberg's admin scheme update now gives Ectoplasm a `#523f6d` sidebar and a dark lime `#606e00` primary that keeps a white label. Use the same colors for the Ectoplasm menu, and drop the overrides that the lighter `#a3b745` lime needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… toolbar menu.

- Use Gutenberg's darker Ectoplasm stroke color, `#455100`, as Ectoplasm's button color. The lightened focus rings that derive from it keep 3:1 contrast on light backgrounds.
- Use Gutenberg's Fresh ramp color `#2e3336` for the secondary toolbar submenu, so that its `#72aee6` links reach 5.42:1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ciampo ciampo self-assigned this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant