feat(ui): derive gray tokens from neutral and background - #9710
feat(ui): derive gray tokens from neutral and background#9710alexcarpenter wants to merge 2 commits into
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Description
Stacked on #9699. Exploration for discussion, not ready to merge.
Removes the internal
grayscale and derives every achromatic token from two public roots:--cl-color-neutral(black on light, white on dark) mixed into--cl-color-background(white on light, gray 900 on dark) at a fixed percentage per color scheme. The percentages reproduce the Figma gray steps, since grays have zero chroma and an oklab mix is linear in lightness. Rounded to whole percents; lightness drifts by under 0.5%.--cl-color-background-subtle,--cl-color-border-subtle--cl-color-border--cl-color-input--cl-color-foreground-disabled--cl-color-input-placeholder--cl-color-foreground-secondary--cl-color-foreground--cl-color-ringThe card shadow and hairline mix from
--cl-color-foregroundand--cl-color-neutralinstead of gray literals. Brand and the status colors stay literal.The point: overriding
--cl-color-neutralalone retints the whole ramp. Swingset gets a "Warm neutral" header toggle that sets--cl-color-neutralto a warm brown / cream so the effect can be previewed on every component.Trade-offs to discuss:
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change