Add Chroma: shared color roles, gradients and capability fallback - #220
Open
raiseCatError wants to merge 1 commit into
Open
raiseCatError wants to merge 1 commit into
raiseCatError wants to merge 1 commit into
Conversation
This was referenced Sep 29, 2026
raiseCatError
added this pull request to stack #228
September 29, 2026 22:29
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.
Implements #171.
Stacked on #219 (
feature/170-accessibility-baseline), on #218, #217 and #203. Merge order: #203, #217, #218, #219, then this PR.What changed
src/chroma/chroma.ts: color references in three separate categories: status (success/failure/working), theme (primary, accent, selection and so on) and identity (a thing's own color, such as a language).statusMeaning()returns a value only for status colors, so an identity color can never read as success or failure. Also solid colors, linear and multi-stop gradients, easing curves (linear, ease-in, ease-out, ease-in-out), luminance andgradientText.src/chroma/escape.ts: one place that turns a color into an escape sequence for truecolor, 256-color or no color.ui/paletteforeground()/background()now go through it, so every existing panel follows the capability level.NMSH_COLOR=256selects the 256-color mapping; automatic detection is not added.BRAND_LAVENDER(#A67CF3) is exported as a default, and nothing depends on it.Boundaries
/copyare untouched.Verification
tests/chroma.test.ts; full suite 642/642, typecheck, build andgit diff --checkclean.