Themes: Fix washed-out diff accents and invisible word highlighting - #825
Open
masonmcelvain wants to merge 3 commits into
Open
Themes: Fix washed-out diff accents and invisible word highlighting#825masonmcelvain wants to merge 3 commits into
masonmcelvain wants to merge 3 commits into
Conversation
Low-contrast diff accents were rescued with a fixed 45% black/white blend, washing genuine palette colors into pastel or mud — e.g. catppuccin-latte's green (contrast 2.96, missing the floor by 0.04) was crushed from #40a02b to #235818 even though a 2% nudge suffices. Since sign colors seed the derived row tints and badges, the wash propagated through the whole theme. Step the blend up from 2% until the contrast floor passes instead, which preserves hue by construction and keeps saturation loss proportional to how far out of range the accent is. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contrast stepping in readableTintedBackground could converge a theme's row tint (0.12/0.2) and word-emphasis tint (0.18/0.28) onto the same color, making word-level diff highlighting invisible — everforest-light, one-dark-pro, and material-theme-palenight all collapsed to identical pairs, and plastic sat 6 channel units apart. Derive the emphasis tints first at full readable strength, then step the row tint further down until the pair clears a minimum channel-distance floor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@masonmcelvain is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
PR author is not in the allowed authors list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The two contrast guards in
src/ui/themes.tsprotected readability but destroyed theme identity in the process. This fixes both while keeping every existing contrast invariant.Changes
readableDiffSignnow rescues low-contrast accents with the smallest black/white blend that clears the 3:1 floor, stepping up from 2%, instead of a fixed 45% wash.#40a02b→#3f9d2a) instead of being crushed to#235818.addedContentBg/removedContentBg) now derive first at full readable strength, and the row tints step further down until the pair clears a 12 channel-distance separation floor (readableSeparatedRowBackground).Tests
QA
--theme catppuccin-latte(sign colors),--theme one-dark-proor--theme everforest-light(word-level highlighting on changed rows).catpuccin-latteone-dark-proeverforest-light