Skip to content

feat: tint diffs, messages and selection in every theme (1.1.0) - #15

Merged
abullard1 merged 1 commit into
mainfrom
feat/theme-surfaces-1.1.0
Sep 28, 2026
Merged

abullard1 merged 1 commit into
mainfrom
feat/theme-surfaces-1.1.0

Conversation

@abullard1

Copy link
Copy Markdown
Owner

Summary

The seven themes set only 7 of Claude Code's ~50 color tokens. Diffs, the background behind your messages, and mouse selection fell back to Claude Code's neutral presets, so every dark theme showed the same saturated red/green diff blocks and a gray message background that clashed with palettes like Nord and Sepia. Claude Code 2.1.246 started applying custom-theme diff colors, so each theme now sets 9 more tokens in its own palette:

diffAdded, diffRemoved, diffAddedDimmed, diffRemovedDimmed, diffAddedWord, diffRemovedWord, userMessageBackground, userMessageBackgroundHover, selectionBg

How the values were chosen

  • Diff tints blend each theme's own success / error color into its canonical background (lines 22%, dimmed 10%, word highlights 45%), the same approach Dracula and Nord use upstream. The blend is softened only as far as needed for the theme's text to stay at WCAG AA 4.5:1, or 3:1 for word highlights (Claude Code's own dark preset is about 3.1:1 there).
  • Selection uses each palette's upstream selection color where one exists. The message background starts from each theme's existing promptBorder surface.
  • Solarized switches to its emphasized text shade (Dark #839496 → #93A1A1, Light #657B83 → #586E75). The standard shades are already below 4.5:1 on Solarized's own backgrounds. Trade-off: Solarized Light's tints stay faint.

Values were checked in real Claude Code 2.1.278 /theme preview renders before and after, for all seven themes.

Changes

  • plugins/claude-bionify/themes/*.json: 9 new tokens each, plus the Solarized text shades
  • tests/test_themes.py (new): fails on any value Claude Code would silently ignore (not #rrggbb), on missing tokens, and on any text/background pair below the floors. Reuses BACKGROUNDS from assets/generate_themes.py.
  • assets/themes.svg: regenerated (only the two Solarized text swatches change)
  • README theme notes and palette table, CHANGELOG [1.1.0], version 1.1.0 and badges

Test plan

  • pytest -q: 140 passed, 2 skipped
  • New test fails against the old themes (7 failed) and on a deliberately broken value
  • ruff check plugins/claude-bionify/scripts tests assets with ruff 0.16.0 (CI's pin)
  • claude plugin validate . --strict and ./plugins/claude-bionify --strict
  • generate_themes.py output matches the committed themes.svg
  • CI green
  • After merge: pick each custom:claude-bionify:* theme in /theme, and check a real edit diff and your message background

🤖 Generated with Claude Code

The themes set 7 of Claude Code's ~50 color tokens, so diffs, the message
background and mouse selection fell back to the neutral presets: every dark
theme showed the same saturated red/green diff blocks and a gray message
background that clashed with tinted palettes. Since Claude Code 2.1.246
custom themes apply diff colors, so each theme now sets 9 more tokens in its
own palette.

Diff tints blend the theme's success/error color into its canonical
background, softened only as far as needed for text to stay at WCAG AA
(4.5:1; 3:1 for changed-word highlights). Selection uses each palette's
upstream selection color. Solarized moves to its emphasized text shade,
since its standard shades are already below 4.5:1 on its own backgrounds.

tests/test_themes.py fails on any value Claude Code would silently ignore
and on any pair below those floors.
Copilot AI balanced review requested due to automatic review settings September 28, 2026 22:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@abullard1
abullard1 merged commit a64b0a7 into main Sep 28, 2026
7 checks passed
@abullard1
abullard1 deleted the feat/theme-surfaces-1.1.0 branch September 28, 2026 23:20
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.

2 participants