Skip to content

Theme: Generate perceptually balanced color ramps - #82294

Open
ciampo wants to merge 44 commits into
trunkfrom
codex/theme-anchored-foreground-scale
Open

ciampo wants to merge 44 commits into
trunkfrom
codex/theme-anchored-foreground-scale

Conversation

@ciampo

@ciampo ciampo commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #77153.

Follow up to #82037. Alternative implementation to #81537.

Issue #81162 was fixed by the extracted active-fill work in #82542. The default-ramp build-order fix was extracted to #82525. The contrast cache from #82445 remains on trunk. The deterministic chroma-capacity cache from #82505 was later removed by #82591. This branch follows those trunk decisions.

What?

This PR makes generated color ramps look more evenly spaced across light and dark themes. It adds a stronger foreground step for interaction states, while normal content and resting controls use the preceding step.

Why?

Even numeric lightness steps can look uneven. Strong resting foregrounds also leave too little room for hover, focus, and pressed states to become visibly stronger.

How?

Surfaces use OKLr lightness, strokes use perceptual color differences, and foregrounds use APCA to distribute visible emphasis. WCAG ratios remain hard constraints and are checked again after sRGB serialization.

The solver omits globally unused internal ramp steps. Color spaces register only when needed. Public ThemeProvider settings and semantic token names remain unchanged.

Testing Instructions

  1. Run npm run storybook:dev. Open Design System → Theme → Theme Provider → Color Scales → Sample Combinations. Compare the surface progression, text-state differences, and warnings across the samples.
  2. In Color Scales → Default, try backgrounds #ffffff, #fefefe, #000000, and #010101. White should retain a darker neighboring surface. Black should retain a lighter one.
  3. Open Design System → Components → Button and Skeleton. Use the Theme toolbar to try light, dark, and custom colors. Check readable labels, distinct interaction states, and a visible Skeleton on white.

Testing Instructions for Keyboard

In Button stories, use Tab to focus and Space or Enter to press. Check visible focus and interaction colors. Disabled examples should remain disabled.

Screenshots

Before vs After

Screenshot 2026-09-03 at 12 57 06 Screenshot 2026-09-03 at 13 00 53

"Tab 2" is "active", other tabs are resting

Screenshot 2026-09-03 at 13 01 55 Screenshot 2026-09-03 at 13 15 39 Screenshot 2026-09-03 at 13 16 44

The main observable difference is weaker neutral resting text, which leaves room for stronger active text.

Kapture.2026-09-03.at.13.19.25.mp4

Performance

I remeasured the rebased branch against trunk e6eee38b with Node v24.20.0 on macOS arm64. The benchmark used six alternating isolated-process pairs. Each process ran 30 measured samples after 8 warmups. The table reports the median of the six process medians.

Case Trunk PR Change
Background ramp 1.160 ms 1.180 ms +1.7%
Accent ramp 2.019 ms 2.549 ms +26.2%
Complete uncached theme 15.255 ms 17.511 ms +14.8%

The fixtures cover the default light theme, the default dark theme, and Ectoplasm. A complete theme builds one background ramp and six accent ramps. Background-ramp time is effectively unchanged. The extra foreground, surface, and stroke reconstruction adds about 14.8% to complete uncached theme generation.

ThemeProvider still memoizes ramp generation, and #82445's luminance cache remains on both sides. These measurements isolate first-time generation rather than repeated renders. The branch also follows trunk's #82545 search reuse and #82591 exact chroma calculation.

Follow-ups

  • Define a systematic approach to the lightness direction of bgFill1 and bgFill2 for interactive backgrounds.
  • Add an additional foreground fill token for the active button state.

Profile the new foreground and perceptual reconstruction passes separately if the uncached cost needs more work. The earlier 38% Color.js prototype predates #82545 and #82591, so it is no longer a valid estimate.

Use of AI Tools

OpenAI Codex helped implement the algorithm, generate tests and artifacts, reconcile the branch with current trunk, run verification and performance benchmarks, and draft this description. The author reviewed the resulting code and behavior.

@github-actions github-actions Bot added [Package] Base styles /packages/base-styles [Package] Theme /packages/theme labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: hi0001234d <emptyopssphere@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +10.4 kB (+0.12%)

Total Size: 8.53 MB

📦 View Changed
Filename Size Change
build/modules/boot/index.min.js 58 kB +67 B (+0.12%)
build/modules/workflow/index.min.js 87.7 kB +35 B (+0.04%)
build/scripts/block-directory/index.min.js 55.5 kB +162 B (+0.29%)
build/scripts/block-editor/index.min.js 518 kB +236 B (+0.05%)
build/scripts/block-library/index.min.js 440 kB +186 B (+0.04%)
build/scripts/components/index.min.js 339 kB +191 B (+0.06%)
build/scripts/customize-widgets/index.min.js 60.5 kB +157 B (+0.26%)
build/scripts/edit-post/index.min.js 53 kB +6 B (+0.01%)
build/scripts/edit-site/index.min.js 386 kB +88 B (+0.02%)
build/scripts/edit-widgets/index.min.js 67.5 kB +150 B (+0.22%)
build/scripts/editor/index.min.js 638 kB +305 B (+0.05%)
build/scripts/format-library/index.min.js 88.4 kB +209 B (+0.24%)
build/scripts/media-utils/index.min.js 228 kB +81 B (+0.04%)
build/scripts/patterns/index.min.js 12.5 kB +43 B (+0.35%)
build/scripts/theme/index.min.js 32.8 kB +5.79 kB (+21.46%) 🚨
build/scripts/widgets/index.min.js 69.3 kB +28 B (+0.04%)
build/styles/block-editor/style-rtl.css 20.8 kB +235 B (+1.15%)
build/styles/block-editor/style-rtl.min.css 17.6 kB +203 B (+1.17%)
build/styles/block-editor/style.css 20.8 kB +232 B (+1.13%)
build/styles/block-editor/style.min.css 17.6 kB +210 B (+1.21%)
build/styles/block-library/icon/editor-rtl.css 1.54 kB -1 B (-0.06%)
build/styles/components/style-rtl.css 16.7 kB +127 B (+0.77%)
build/styles/components/style-rtl.min.css 14.1 kB +136 B (+0.97%)
build/styles/components/style.css 16.8 kB +121 B (+0.73%)
build/styles/components/style.min.css 14.2 kB +139 B (+0.99%)
build/styles/customize-widgets/style-rtl.css 2.93 kB +46 B (+1.6%)
build/styles/customize-widgets/style-rtl.min.css 1.92 kB +46 B (+2.46%)
build/styles/customize-widgets/style.css 2.92 kB +47 B (+1.63%)
build/styles/customize-widgets/style.min.css 1.91 kB +46 B (+2.46%)
build/styles/edit-site/style-rtl.css 22 kB +71 B (+0.32%)
build/styles/edit-site/style-rtl.min.css 17.9 kB +46 B (+0.26%)
build/styles/edit-site/style.css 22 kB +75 B (+0.34%)
build/styles/edit-site/style.min.css 17.9 kB +44 B (+0.25%)
build/styles/edit-widgets/style-rtl.css 5.33 kB +93 B (+1.77%)
build/styles/edit-widgets/style-rtl.min.css 3.92 kB +90 B (+2.35%)
build/styles/edit-widgets/style.css 5.33 kB +91 B (+1.74%)
build/styles/edit-widgets/style.min.css 3.92 kB +92 B (+2.4%)
build/styles/editor/style-rtl.css 32.7 kB +92 B (+0.28%)
build/styles/editor/style-rtl.min.css 27.8 kB +85 B (+0.31%)
build/styles/editor/style.css 32.8 kB +96 B (+0.29%)
build/styles/editor/style.min.css 27.7 kB +85 B (+0.31%)
build/styles/theme/design-tokens-rtl.css 3.21 kB +40 B (+1.26%)
build/styles/theme/design-tokens-rtl.min.css 1.55 kB +27 B (+1.78%)
build/styles/theme/design-tokens.css 3.21 kB +40 B (+1.26%)
build/styles/theme/design-tokens.min.css 1.55 kB +27 B (+1.78%)

7af12f5 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric aa40ce0 trunk % Change
timeToFirstByte 56.25 ms +5.07% -3.38% 55.85 ms +4.92% -3.22% 0.72%
largestContentfulPaint 98 ms +6.12% -10.2% 94 ms +6.38% -6.38% 4.26%
lcpMinusTtfb 38.7 ms +15.5% -8.53% 35.8 ms +22.07% -5.73% 8.1%
wpBeforeTemplate 29.21 ms +10.51% -2.02% 29.23 ms +5.41% -2.36% -0.07%
wpTemplate 22.35 ms +4.88% -4.07% 21.82 ms +5.64% -3.62% 2.43%
wpTotal 52.38 ms +5.36% -3.28% 52.04 ms +3.52% -2.77% 0.65%
wpMemoryUsage 7.61 MB +0% -0% 7.58 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric aa40ce0 trunk % Change
timeToFirstByte 42.1 ms +6.65% -1.07% 46.35 ms +4.96% -1.62% -9.17%
largestContentfulPaint 92 ms +2.17% -0% 100 ms +4% -0% -8%
lcpMinusTtfb 50 ms +1.2% -1.5% 54.65 ms +4.39% -1.19% -8.51%
wpBeforeTemplate 26.97 ms +2.45% -2.04% 26.73 ms +1.12% -2.02% 0.9%
wpTemplate 12.38 ms +1.7% -1.21% 16.52 ms +4.12% -2.54% -25.06%
wpTotal 39.24 ms +6.8% -1.25% 43.34 ms +4.31% -1.85% -9.46%
wpMemoryUsage 6.14 MB +0% -0% 6.20 MB +0% -0% -1.07%
wpDbQueries 10 +0% -0% 14 +0% -0% -28.57%

media-processing

Metric aa40ce0 trunk % Change
mediaProcessingJpeg 406.1 ms +0.63% -1.52% 403.61 ms +1.01% -0.88% 0.62%
mediaProcessingAvif 6051.17 ms +0.13% -0.09% 6066.13 ms +0.13% -0.06% -0.25%
mediaProcessingJpegToAvif 4219.08 ms +0.95% -0.66% 4195.44 ms +0.15% -0.14% 0.56%

media-upload

Metric aa40ce0 trunk % Change
jpegUploadProcessing 1455.81 ms +33.6% -2.01% 1430.9 ms +0.93% -0.59% 1.74%
pngUploadProcessing 209.64 ms +5.73% -10.94% 180.73 ms +20.37% -6.36% 16%
largeJpegUploadProcessing 1409.84 ms +0.94% -0.34% 1420.04 ms +2.57% -0.84% -0.72%
multipleImageUploadProcessing 1612.8 ms +26.74% -2.64% 1623.54 ms +8.97% -3.71% -0.66%

post-editor

Metric aa40ce0 trunk % Change
serverResponse 491.2 ms +10.32% -2.27% 472.17 ms +8.55% -1.74% 4.03%
firstPaint 217.73 ms +12.3% -6.33% 222.34 ms +17.65% -2.9% -2.07%
domContentLoaded 1140.26 ms +3.11% -0.9% 1134.82 ms +0.98% -0.41% 0.48%
loaded 1141.42 ms +3.11% -0.9% 1136.03 ms +0.98% -0.42% 0.47%
firstContentfulPaint 488.49 ms +0.56% -1.01% 481.16 ms +1.17% -3.16% 1.52%
firstBlock 3391 ms +0.68% -1.66% 3338.13 ms +0.63% -0.37% 1.58%
type 17.49 ms +3.6% -3.95% 17.2 ms +7.91% -1.8% 1.69%
typeWithoutInspector 17.34 ms +6.98% -3.17% 17.11 ms +7.31% -3.45% 1.34%
typeWithTopToolbar 24.45 ms +3.64% -6.58% 22.8 ms +6.97% -6.62% 7.24%
typeContainer 8.36 ms +2.87% -10.89% 7.98 ms +4.51% -1.25% 4.76%
focus 115.57 ms +4.67% -3.82% 107.25 ms +6.64% -3.43% 7.76%
firstFocus 211.65 ms +0% -0% 230.24 ms +0% -0% -8.07%
selectAll 524.61 ms +7.75% -2.45% 566.18 ms +2.72% -3.45% -7.34%
listViewOpen 80.66 ms +7.43% -5.63% 72.9 ms +7.24% -5.95% 10.64%
inserterOpen 39.66 ms +9.38% -12.71% 39.82 ms +1.51% -4.97% -0.4%
inserterHover 11.89 ms +5.3% -14.3% 11.93 ms +7.88% -4.36% -0.34%
inserterSearch 8.71 ms +7.35% -3.44% 8.47 ms +5.55% -0.94% 2.83%
loadPatterns 603.63 ms +7.11% -2.56% 606.11 ms +8.4% -2.09% -0.41%
wpTotal 480.39 ms +10.55% -2.26% 460.99 ms +8.8% -1.75% 4.21%
wpMemoryUsage 13.33 MB +0% -0% 13.30 MB +0% -0% 0.28%
wpDbQueries 54 +0% -1.85% 54 +0% -1.85% 0%

site-editor

Metric aa40ce0 trunk % Change
serverResponse 312.1 ms +1.68% -10.21% 322.65 ms +1.55% -1.68% -3.27%
firstPaint 236.18 ms +26.45% -13.83% 193.9 ms +1.33% -1.87% 21.81%
domContentLoaded 903.38 ms +4.07% -0.79% 923.98 ms +1.21% -0.61% -2.23%
loaded 904.35 ms +4.06% -0.8% 925.04 ms +1.2% -0.59% -2.24%
firstContentfulPaint 378.63 ms +4.97% -1.97% 380.37 ms +4.41% -0.58% -0.46%
firstBlock 3434.67 ms +0.41% -1.55% 3414.48 ms +1.04% -2.31% 0.59%
type 15.5 ms +4.39% -1.87% 15.19 ms +8.43% -3.23% 2.04%
navigate 90.41 ms +17.81% -4.7% 93.17 ms +3.67% -10.31% -2.96%
loadPatterns 1155.8 ms +8.08% -11.47% 1008.67 ms +16.3% -2.31% 14.59%
loadPages 1096.05 ms +4.53% -2.45% 1040.41 ms +1.48% -1.77% 5.35%
wpTotal 302.92 ms +1.67% -10.45% 313.36 ms +1.68% -1.65% -3.33%
wpMemoryUsage 12.38 MB +0% -0% 12.34 MB +0% -0% 0.3%
wpDbQueries 43 +2.33% -0% 43 +2.33% -0% 0%

7af12f5 Run

🏁 Flaky tests

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

should handle legacy widgets in /test/e2e/specs/widgets/customizing-widgets.spec.js, passed after 2 failed attempts.
Error: expect(locator).toBeVisible() failed

Locator: locator('[data-block="f7a62e02-8798-4f83-b78d-61dd48317dde"]').locator('role=heading[name="Test Widget"][level=3]')
Expected: visible
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeVisible" locator('[data-block="f7a62e02-8798-4f83-b78d-61dd48317dde"]').locator('role=heading[name="Test Widget"][level=3]') with timeout 5000ms
  - waiting for locator('[data-block="f7a62e02-8798-4f83-b78d-61dd48317dde"]').locator('role=heading[name="Test Widget"][level=3]')

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/widgets/customizing-widgets.spec.js:385:5
Error: expect(locator).toBeVisible() failed

Locator: locator('[data-block="35e9c60b-f11c-442c-ba7a-c985f6c2f809"]').locator('role=heading[name="Test Widget"][level=3]')
Expected: visible
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeVisible" locator('[data-block="35e9c60b-f11c-442c-ba7a-c985f6c2f809"]').locator('role=heading[name="Test Widget"][level=3]') with timeout 5000ms
  - waiting for locator('[data-block="35e9c60b-f11c-442c-ba7a-c985f6c2f809"]').locator('role=heading[name="Test Widget"][level=3]')

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/widgets/customizing-widgets.spec.js:385:5

7af12f5 Run

@ciampo ciampo self-assigned this Sep 1, 2026
@ciampo
ciampo force-pushed the codex/theme-anchored-foreground-scale branch 4 times, most recently from 07a2661 to 4bb53ec Compare September 2, 2026 23:36
@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: c5070a1b-9313-4f26-9df9-dbe8d16a14f3

📥 Commits

Reviewing files that changed from the base of the PR and between 2abea89 and 06682eb.

📒 Files selected for processing (3)
  • packages/theme/src/color-ramps/lib/build-foreground-scale.ts
  • packages/theme/src/color-ramps/lib/color-utils.ts
  • packages/theme/src/color-ramps/test/color-space-registration.test.ts
💤 Files with no reviewable changes (1)
  • packages/theme/src/color-ramps/test/color-space-registration.test.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

Theme color-ramp generation now rebuilds surfaces, strokes, and foreground scales with perceptual and contrast constraints. Accent ramps support semantic purposes. ThemeProvider integration, generated token assets, fallbacks, documentation, examples, and regression tests were updated.

Changes

Color ramp generation

Layer / File(s) Summary
Ramp contracts and shared constraints
packages/theme/src/color-ramps/lib/*
Ramp types and configurations now separate base steps from foreground scales. Contrast references support additional dependencies. Color utilities register spaces lazily, and taper-chroma caching uses exact per-space keys.
Perceptual ramp reconstruction and purpose selection
packages/theme/src/color-ramps/index.ts, packages/theme/src/color-ramps/lib/index.ts, packages/theme/src/color-ramps/lib/build-foreground-scale.ts, packages/theme/src/color-ramps/lib/build-perceptual-steps.ts
Background polarity selection, surface and stroke rebuilding, APCA/WCAG foreground solving, lazy strong-color calculation, and full, interactive, and status accent outputs were added.
Theme integration and generated token outputs
packages/theme/src/use-theme-provider-styles.ts, packages/theme/src/theme-provider-color-warnings.ts, packages/theme/tokens/color.json, packages/theme/prebuilt/*, packages/base-styles/internal/_wpds-token-fallbacks.scss, packages/theme/package.json
ThemeProvider now generates purpose-specific accent ramps. Primitive tokens, aliases, CSS assets, JavaScript fallbacks, SCSS fallbacks, and build ordering were updated.
Ramp validation and examples
packages/theme/src/color-ramps/test/*, packages/theme/src/test/*, packages/theme/src/color-ramps/stories/*, storybook/stories/design-system/*
Tests cover contrast, polarity, spacing, serialization, cache isolation, color-space registration, purpose-specific output, and ThemeProvider rerenders. Example theme colors and ramp previews were updated.

Estimated code review effort: 5 (Critical) | ~90 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ThemeProvider
  participant buildBgRamp
  participant buildRamp
  participant buildPerceptualSteps
  participant buildForegroundScale
  participant colorTokensCSS
  ThemeProvider->>buildBgRamp: build background ramp
  ThemeProvider->>buildRamp: build purpose-specific accent ramp
  buildRamp->>buildPerceptualSteps: rebuild surfaces and strokes
  buildPerceptualSteps->>buildForegroundScale: solve foreground scale
  buildRamp-->>ThemeProvider: return typed ramp result
  ThemeProvider->>colorTokensCSS: generate CSS tokens and fallbacks
Loading

Suggested reviewers: aduth

Merge Risk: ⚪ Minimal · up to 06682

Theme color scales now provide perceptually balanced text and interaction colors while retaining contrast constraints. No concrete merge-blocking behavior or production risk is identified in the supplied current-head evidence.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 41.46% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 82 functions across 32 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address both linked issues. For [#81162], the new foreground-scale, active-fill, multi-reference contrast checks, and regression tests enforce contrast for active semantic pairs while pres…
Out of Scope Changes check ✅ Passed The implementation, generated outputs, documentation, changelog updates, and tests support the color-scale, contrast, and interactive-state objectives. No unrelated code changes are evident.
Title check ✅ Passed The title clearly and concisely describes the main change: generating perceptually balanced color ramps.
Description check ✅ Passed The description directly explains the color-ramp changes, implementation approach, testing, performance impact, and follow-up work.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/theme-anchored-foreground-scale

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ciampo ciampo added the [Type] Enhancement A suggestion for improvement. label Sep 3, 2026
Comment thread storybook/stories/design-system/theme-example-application.story.tsx Outdated
@ciampo
ciampo marked this pull request as ready for review September 3, 2026 11:22
@ciampo
ciampo requested a review from a team as a code owner September 3, 2026 11:22
@ciampo
ciampo requested review from a team and fushar September 3, 2026 11:27
@ciampo ciampo changed the title Theme: Use a perceptual five-step foreground scale Theme: Perceptually balanced color scales Sep 3, 2026
@mirka

mirka commented Sep 3, 2026

Copy link
Copy Markdown
Member

One warning about the video in the PR description — the ItemGroup in the site editor sidebar (or just real Gutenberg UIs in general) are not always a good place to judge the overall theming validity, because so many parts of it are not yet properly themed, or ad hoc overridden 😅

But regardless, I do definitely perceive the improvement here in the "perception parity" between light and dark scales 🎉

@jasmussen

Copy link
Copy Markdown
Contributor

This is a nice PR. It deserves more poring over than it might seem to need. For that reason, I wonder if it can wait until @jameskoster has a time to look?

@ciampo

ciampo commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Sure, let's wait for @jameskoster . It will be a nice way for him to dive back into DS / theming

Although I still reccomend y'all take this PR up for a spin and try out Storybook and Editor, to get a first intuiton of whether this overall feels good, and if there any obvious regressions.

Comment thread packages/theme/src/color-ramps/lib/color-utils.ts Outdated
Comment thread packages/theme/src/color-ramps/lib/constants.ts Outdated
Comment thread packages/theme/src/color-ramps/lib/taper-chroma.ts Outdated
@ciampo
ciampo force-pushed the codex/theme-anchored-foreground-scale branch from 06682eb to cbf1909 Compare September 7, 2026 09:45
@ciampo ciampo changed the title Theme: Perceptually balanced color scales Theme: Generate perceptually balanced color ramps Sep 7, 2026
@ciampo
ciampo force-pushed the codex/theme-anchored-foreground-scale branch from 3e55806 to 7af12f5 Compare October 12, 2026 15:10
@github-actions github-actions Bot added the [Package] Edit Widgets /packages/edit-widgets label Oct 12, 2026
@ciampo

ciampo commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

@jameskoster Those bugs should also be fixed:

  • tabs now show the focus ring only for keyboard focus;
  • pressed block-toolbar buttons use the matching strong neutral colors;
  • I also found and fixed similar overrides in the widget headers and toolbar subscripts.

While we continue to refine the approach, I'll start to extract non-theme package related changes to individual PRs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Base styles /packages/base-styles [Package] Block editor /packages/block-editor [Package] Components /packages/components [Package] Edit Widgets /packages/edit-widgets [Package] Editor /packages/editor [Package] Interface /packages/interface [Package] Theme /packages/theme [Package] UI /packages/ui [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theme: Some color token values that should differ do not

5 participants