fix(web): enforce AA contrast for extended terminal colors - #1
Open
lemkyz wants to merge 1 commit into
Open
Conversation
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.
This is a focused follow-up to burakgon#89.
Why
The light palette covers ANSI colors 0–15, but the captured Claude terminal frame also uses xterm 256-color indexes 153, 246, 244, and 211. Against the paper terminal background, those colors measure approximately 1.39:1, 2.81:1, 3.65:1, and 2.08:1. Arbitrary truecolor output can bypass the 16-color palette in the same way.
What changed
minimumContrastvalue toGhosttyTerminalTheme.rgb()/rgba()strings emitted by the Ghostty runtime.4.5:1enforcement only for light mode; dark and OLED retain their existing rendering.setTheme/rc-theme-changepath.Verification
pnpm typecheckpasses.git diff --checkpass.screenshot.html?scene=terminalcanvas: previously unreadable indexed and faint colors become legible immediately in light mode.This leaves the picker, storage, theme-color meta, tokens, and base light ANSI palette from burakgon#89 unchanged.