You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stacked on #9699. Exploration for discussion, not ready to merge.
Removes the internal gray scale 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%.
The card shadow and hairline mix from --cl-color-foreground and --cl-color-neutral instead of gray literals. Brand and the status colors stay literal.
The point: overriding --cl-color-neutral alone retints the whole ramp. Swingset gets a "Warm neutral" header toggle that sets --cl-color-neutral to a warm brown / cream so the effect can be previewed on every component.
Trade-offs to discuss:
The percentages assume neutral is near black / near white. A warm neutral at 0.2 lightness lands foreground at about 0.36 instead of 0.2, so a themed neutral trades contrast for hue unless it stays very dark.
Menu and dialog popup shadows, the drawer hairline, the dialog and drawer scrims, and the input hover border and focus shadow still use literal grays and do not follow neutral yet.
Checklist
pnpm test runs as expected.
pnpm build runs as expected.
(If applicable) JSDoc comments have been added or updated for any package exports
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
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
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.
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