Add colorblind-friendly gallery themes#157
Conversation
There was a problem hiding this comment.
I tested both themes locally in kitty. Dark looks fine.
Light has a real issue: chroma-style = xcode uses LiteralString = #c41a16 (red) and Comment = #177500 (green), so syntax highlighting in viewed files defeats the whole point of the theme. Very visible on markdown content.
modus-vivendi (which dark already uses) has a matching light counterpart modus-operandi in chroma. Strings blue (#2544bb), comments grey (#505050), no red/green pair. That's the right pick for the light variant since the description already cites GNU Modus.
other than that lgtm, thx for the contribution.
upd: this is what light looks like in my kitty:
|
to expand on the chroma-style point: it's worse than just red/green tokens. Xcode's revdiff's modus-operandi is symmetric to modus-vivendi ( |
|
Done, thanks. Now looks good. Fun fact: I'm colorblind myself and didn't realize the text was red. |
umputun
left a comment
There was a problem hiding this comment.
lgtm, thx. The faint +/- prefix on highlighted lines is a revdiff rendering bug, not on your theme. The highlighted line style at app/ui/style/resolver.go:193 sets bg only and expects chroma to set fg per token, but the prefix is prepended outside the chroma path so it falls through to the terminal default fg. I'll patch that separately.
Problem
revdiff has several bundled and gallery themes, but no theme pair aimed at users who have difficulty relying on red/green distinctions in diffs.
Solution
Add two gallery-only community themes:
Both use high-contrast add/remove colors and existing Chroma styles. They do not change defaults and are not marked as bundled.
Testing