Skip to content

fix(tui): align TUI themes with canonical upstream palettes and fix contrast bugs - #50525

Open
gotenksIN wants to merge 7 commits into
anomalyco:v2from
gotenksIN:oc2-tui-theme-fixes
Open

gotenksIN wants to merge 7 commits into
anomalyco:v2from
gotenksIN:oc2-tui-theme-fixes

Conversation

@gotenksIN

@gotenksIN gotenksIN commented Sep 22, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #50523

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fix the seven audited built-in TUI themes:

  • Catppuccin Frappé: correct blue and overlay2 swatches; use Latte for every light-mode role.
  • Catppuccin Macchiato: use Latte for every light-mode role; preserve all dark colors.
  • Ayu: add complete Ayu Light UI, Markdown, diff, and syntax mappings; preserve existing dark colors.
  • Night Owl: add complete Light Owl mappings, including blue strings and magenta numbers; preserve existing dark colors.
  • Kanagawa: replace the hybrid light palette with Lotus; correct carpYellow to #E6C384 and roninYellow to #FF9E3B; preserve the remaining resolved dark colors.
  • Solarized: separate ordinary borders from panel backgrounds and keep active borders distinct in both modes.
  • Material: correct dark orange to #f78c6c and dark pink to #ff5370.

Frappé and Macchiato light outputs match the existing built-in Latte theme, including diff colors.
Ayu and Light Owl use opaque project-specific diff backgrounds and gutters derived from their light palettes.
These adaptations are not upstream swatches.

Palette references

How did you verify your code works?

  • bun run check: lint passes; all 35 package typechecks pass.
  • packages/tui: bun test test/theme.test.ts test/mini/theme.test.ts — 38 tests pass.
  • packages/theme: bun test — 2 tests pass.
  • Resolve all seven themes through public parsing, migration, and resolution in both modes.
  • Compare Frappé and Macchiato light colors with the existing Latte reference.
  • Compare dark outputs against upstream, allowing only the audited swatch and border corrections.
  • Review 28 before/after captures at 160 × 48 cells using the same TUI build and isolated simulated sessions.
    Capture metadata records the capture-time HEAD and separate working-tree theme hashes.
    Those theme hashes match the final commits.

The previews show actual TUI rendering; they do not certify general WCAG contrast compliance.

Screenshots / recordings

Before uses upstream v2 theme assets; after uses the audited assets on the same TUI build.
Latte appears once because Frappé and Macchiato use identical light mappings.

Light palettes: Ayu, Light Owl, Lotus, and Latte
Theme Before After
Ayu Light Ayu light before Ayu Light after
Light Owl Night Owl light before Light Owl after
Kanagawa Lotus Kanagawa light before Kanagawa Lotus after
Catppuccin Latte, shown with Frappé Frappé light before Latte after, shown with Frappé
Frappé and Material swatches; Solarized light and dark
Theme Before After
Frappé dark Frappé dark before Frappé dark after
Solarized light Solarized light before Solarized light after
Solarized dark Solarized dark before Solarized dark after
Material dark Material dark before Material dark after

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@jlongster

Copy link
Copy Markdown
Collaborator

@gotenksIN hey sorry for the delay!

I checked this out and there are several issues if you look at the comparisons: https://jamesbox.exe.xyz/artifacts/theme-palettes-pr50525/

  • the ayu light palette is missing colors for the diff. same for nightowl
  • the kanagawa light mode looks worse
  • why did nightowl change the panel color? it looks inverted, I would remove that

Correct Frappé blue and overlay2 to the upstream palette.
Map all light roles to the existing Latte theme, including diff colors.
Keep the remaining dark roles unchanged.

Sources: catppuccin/palette and the built-in catppuccin.json theme.
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Map every light role to the existing Latte palette and diff colors.
Preserve all Macchiato dark colors and role mappings.

Sources: catppuccin/palette and the built-in catppuccin.json theme.
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Use the Ayu Light palette for UI, Markdown, diff, and syntax roles.
Add opaque light diff backgrounds and gutters while preserving all
existing dark colors.

Palette: ayu-theme/ayu-colors, themes/light.yaml at revision
b0fd979a1ddf050101b43311fa598a1a9c5f1bbc.
Operator: ayu-theme/ayu-colors v8.0.1, src/light.ts.

Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Use Light Owl colors across UI, Markdown, diff, and syntax roles.
Map strings, functions, and types to blue; use magenta for numbers.
Add opaque light diff backgrounds and gutters. Preserve dark colors.

Source: sdras/night-owl-vscode-theme, Light Owl palette at revision
cc291eba7976b20d7c66bde6883c27b902196b07.

Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Replace the hybrid light palette with Lotus UI, Markdown, diff, and
syntax colors. Use canonical names for existing dark swatches.
Correct carpYellow to #E6C384 and roninYellow to #FF9E3B while keeping
all other resolved dark colors unchanged.

Source: rebelot/kanagawa.nvim, colors.lua and themes.lua.
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Move ordinary borders off the panel background in both modes.
Use base01/base1 for ordinary borders and base0/base00 for active
borders so the two states remain distinct.

Source: the canonical Solarized base palette.
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Use #f78c6c for darkOrange instead of duplicating darkYellow.
Use #ff5370 for darkPink instead of the orange swatch.

Source: material-theme/vsc-material-theme.
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
@gotenksIN

gotenksIN commented Sep 30, 2026 •

Copy link
Copy Markdown
Author

@gotenksIN hey sorry for the delay!

I checked this out and there are several issues if you look at the comparisons: https://jamesbox.exe.xyz/artifacts/theme-palettes-pr50525/

  • the ayu light palette is missing colors for the diff. same for nightowl
  • the kanagawa light mode looks worse
  • why did nightowl change the panel color? it looks inverted, I would remove that

@jlongster Hi sorry for the inconsistencies, I only looked too hard at catpuccin previously, rest were from automated audit. I’ve addressed these issues and looked at all themes properly.

Ayu and Light Owl: Added complete light diff foregrounds, backgrounds, and line-number gutters, plus the missing Markdown and syntax mappings.
Kanagawa: Replaced the hybrid light palette with consistent Lotus colors across the UI, diffs, Markdown, and syntax. Unrelated dark mappings remain unchanged.
Night Owl panel: Restored the dark panel to #0b253a and removed the unrelated dark palette changes.

The PR description now includes selected before/after captures and upstream palette links.

As for Kanagawa looking worse, https://user-images.githubusercontent.com/36300441/222913073-22b95f11-8c08-4b2b-867c-19072c921de1.png it's just like that

Could you take another look at the updated comparisons?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants