Skip to content

themes: lift muddy accent colors to a 3:1 legibility floor#2

Merged
fcreme merged 1 commit into
mainfrom
improve/theme-legibility-contrast
Jun 8, 2026
Merged

themes: lift muddy accent colors to a 3:1 legibility floor#2
fcreme merged 1 commit into
mainfrom
improve/theme-legibility-contrast

Conversation

@fcreme

@fcreme fcreme commented Jun 8, 2026

Copy link
Copy Markdown
Owner

What

Six bundled themes had chromatic ANSI colors below ~3:1 contrast against their own background — they render as hard-to-read syntax/prompt tokens. This lifts each just past the 3:1 floor.

Theme Slot Before → After Contrast
neon-rain purple #5a4870#6c6279 2.2 → 3.1
umbrella purple #8b3030#815350 2.4 → 3.1
gitbash yellow #a6a000#9b961d 2.7 → 3.1
gitbash brightYellow #c4a500#ad9000 2.4 → 3.1
rain red #a85850#a26d66 2.6 → 3.1
snowday blue #3a6890#44739b 2.6 → 3.1
golden-forest blue #4d5d3a#566743 2.7 → 3.1

How

Each color is lifted in OKLCH — hue held constant (identity preserved, hue shift <1°), only lightness moved to clear the floor (brighter on dark themes; darker on gitbash's white bg). Matching prompt / PSReadLine values are synced (gitbash yellow, rain red, snowday blue).

Notes

  • umbrella red (#b41e1e, 2.99) intentionally left — it's the theme's signature blood-red (banner/prompt/cursor); lifting it would change the theme's identity for an imperceptible gain. Documented as the one allowlisted exception.
  • The 10 already-legible themes are untouched; no hue/font/layout/background changes.

Verification

  • New tests/Scheme-Contrast.Tests.ps1 (191 cases) asserts every chromatic scheme color stays ≥3:1 on its background, so future themes can't regress.
  • Full suite 387/387 green on both pwsh 7 and Windows PowerShell 5.1.

🤖 Generated with Claude Code

Six themes had chromatic ANSI colors below ~3:1 contrast against their own background, rendering as hard-to-read syntax/prompt tokens. Each is lifted in OKLCH -- holding hue (identity preserved), moving only lightness to clear the floor -- with the matching prompt/PSReadLine values kept in sync: neon-rain purple 2.2->3.1, umbrella purple 2.4->3.1, gitbash yellow 2.7->3.1 and brightYellow 2.4->3.1 (darkened, light bg), rain red 2.6->3.1, snowday blue 2.6->3.1, golden-forest blue 2.7->3.1.

umbrella's signature red (#b41e1e, 2.99) is intentionally left as-is: it drives the whole theme's banner/prompt/cursor and lifting it would shift the theme's identity for an imperceptible contrast gain.

Adds tests/Scheme-Contrast.Tests.ps1, asserting every chromatic scheme color stays >=3:1 on its background (umbrella/red a documented exception) so future themes can't reintroduce muddy colors. Full suite green on pwsh 7 and Windows PowerShell 5.1 (387/387).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fcreme fcreme merged commit 22eef96 into main Jun 8, 2026
2 checks passed
@fcreme fcreme deleted the improve/theme-legibility-contrast branch June 8, 2026 21:19
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