Skip to content

palette: themePalette() gives the theme editor's colors (recipe v3, 3:1 icons, tinted inks, track, toast, coloured cards, the look's colors) - #13069

Closed
josephfarina wants to merge 13 commits into
mainfrom
core-palette-look-families
Closed

josephfarina wants to merge 13 commits into
mainfrom
core-palette-look-families

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

HOLD: draft until the AST-008 owners approve the amendment.

What this changes

themePalette() and defineTheme({palette}) give the same colors as the theme editor for the same seeds and recipe (AST-008 DEC-16). Round 15 kept these rules out of Core's shared mapping so themePalette() stayed as it was. This PR brings them into themePalette(), one commit each:

  • Recipe astryx-oklch-v3. It is v2, except that a dusty seed's palest tints (shade 90 and paler) stay at or below the seed's own chroma. Up to shade 70 a ramp is drawn as v2 draws it. A palette that names no recipe still runs v1, and v1 and v2 draw what they shipped with. The entry exports PALETTE_RECIPE_V3 and PALETTE_RECIPE_NEWEST; the theme editor names v3 for a new palette.
  • Icons at 3:1. The accent's and each status color's icon takes the shade nearest its fill that reads at 3:1 on the surfaces, as WCAG asks of graphics, instead of its text's 4.5:1 shade.
  • Tinted inks. A tinted neutral seed's primary text, primary icons and text on dark surfaces (--color-on-dark) carry its tint. A pure gray keeps black and white.
  • Slider track. The neutral seed reaches --color-track, at the shade nearest Core's own.
  • Error toast. The danger seed reaches --color-background-error-inverted, at the shade nearest Core's own.
  • Accent tint under exact accent text. The accent tint moves to the nearest stop under which an exactly set --color-text-accent reads. themePalette() sets no exact text, so its output does not change with this one.
  • Coloured cards. A coloured card (variant:<color>) keeps its own secondary text; the palette no longer lifts it.
  • The look's own colors. themePalette() also returns the colors a look grows from its seeds: category colors (Badge, Token and Card tints), chart colors, code colors and the scrim, and the status roles the input leaves unset, each kept readable on Core's surfaces.

What changes, in numbers

Official themes: no change. None of the 7 official themes (neutral, stone, butter, chocolate, gothic, matcha, y2k) uses palette. Their built CSS (generateThemeCSS) is byte-identical before and after this PR.

A theme made in code with themePalette(). Measured for each official theme's own colors used as seeds: accent, success, warning, danger and info from its light tokens, and neutral from its light secondary text; recipe astryx-oklch-v2. Contrast is against the palette's own page (--color-background-body).

  • Count: every theme goes from 53 tokens to 166, which is 113 added. The additions are 48 category colors, 56 chart colors (--color-data-*), 14 code colors, the slider track and the error toast fill.
  • Card lift blocks: components.card lift blocks go from 9 to 0, because coloured cards keep their own secondary text.
  • Lowest contrast among the added tokens, worst theme:
    • category text on its own tint: 6.45:1;
    • code colors on the code background: 7.19:1;
    • categorical chart colors on the page: 3.73:1.
  • Tokens that already existed and move:
Theme Primary text / icons, light → dark Icons (3:1 rule), lowest light
neutral unchanged (gray seed) success #106500→#198100, 6.45→4.45:1; warning #745b00→#927300, 5.74→3.98:1; error 6.63→4.69:1; info 6.97→4.05:1
stone unchanged (gray seed) info #43546b→#516074, 6.84→5.68:1; the rest are unchanged in light
butter #000000→#12110c (18.56→16.70:1) / #ffffff→#f1f1ef (17.11→15.13:1) accent/info #1545d8→#225bff, 6.46→4.63:1
chocolate #000000→#220800 (18.44→16.72:1) / #ffffff→#f8efe7 (17.32→15.25:1) warning #6d4b00→#9c6d00, 6.94→4.01:1; error 6.12→4.22:1; success 6.51→4.38:1
gothic unchanged (gray seed) accent #4d5458→#70787d, 6.81→3.97:1; error 7.31→4.23:1; info 7.06→4.11:1
matcha #000000→#0e1302 (18.62→16.73:1) / #ffffff→#f0f2ec (17.10→15.16:1) warning #664f00→#927300, 6.94→3.98:1; error 6.18→4.27:1
y2k #000000→#14100c (18.47→16.66:1) / #ffffff→#f2f0ef (17.12→15.07:1) error #9d353f→#ca5c62, 6.13→3.54:1; success 5.50→3.82:1; warning 6.88→3.95:1
  • Text on dark surfaces: --color-on-dark follows primary text for a tinted seed (butter, chocolate, matcha, y2k). On the dark page it reads at 15.07–15.25:1, down from 17.1–17.4:1.
  • Dark-mode icons also move one shade toward their fill. They stay at 6.0:1 or more.
  • No text falls below 4.5:1, and no icon below 3:1.

Decision for the palette spec owners

Question: given an exact page color for each mode, which ramp stops should the surface, card, popover and muted colors take, relative to the page color's own position on its ramp, and in which direction? For example: in dark mode lighter than the page, and in light mode the page at stop 95 with surface and card at 100.

Today: Core derives the page and the surfaces from one neutral seed at fixed stops:

Mode Page Surface Card Popover Muted
Light 95 100 100 100 95
Dark 10 15 10 10 10

A page color set exactly does not move those stops. For example, #5b21b6 sits at about stop 35 of its ramp. In dark mode the surface stays at stop 15 (#262626), darker than the page, at 1.68:1, and the card at stop 10 is 1.92:1. So surfaces read as holes in the page rather than raised above it.

Once the stops are decided, the theme editor writes the derived surface, card, popover and muted tokens from the set page color using the same ramp math as themePalette(), as compiled tokens, with no new Core palette entry point. Core's own palette changes only if the owners decide it should for every theme.

Spec

AST-008 FR19 gains sentences for each rule, and says that a theme made in the editor and one made with themePalette() from the same seeds and recipe get the same colors.

Size

A themePalette()-only import grows from about 18 KB to about 25 KB gzip: it now carries the look's derivations, which are its output, not an optional feature.

Not included

A dial's own dark value (the editor's raw --color-accent set with --mode dark) stays out: themePalette() takes no per-seed dark value, and adding one is an API change of its own.

Changesets

One @astryxdesign/core patch changeset and one @astryxdesign/cli patch changeset per rule.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 5:41am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 20, 2026
@astracat-bot

astracat-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 21, 2026, 5:50 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On hold: approval needs an engineering owner to approve the AST-008 FR19 amendment, and the blocking findings below need fixing.

FR19 says the theme editor names astryx-oklch-v2 for a new palette and sets no icon contrast rule, while this PR moves the editor to the new astryx-oklch-v3 recipe and picks accent and status icons at 3:1, so an engineering owner (the author may, as one) records the decision by commenting /approve-spec <full head SHA>, settling whether the 3:1 icon rule also applies to palettes pinned to v1 or v2 and whether PALETTE_RECIPE_NEWEST, an alias later releases will move, should be public.

Blocking findings:

  • The editor's note still says "warning text and icons use shade …" (packages/core/src/palette/mapping.ts:1375, and its CLI copy), but icons now get their own 3:1 shade: with an exact light warning #c2690a the note names #744700 while the icon is #945d00.
  • v3 is described inaccurately: the CLI changeset says the middle of a ramp is drawn as v1 draws it, but v3 draws shades 55–70 as v2 does (for #4f6a7a at shade 55, v1 gives #008fc6 and v3 #68899d); the description omits that shades 75–85 move too; and four CLI docs promise pale tints at or below the seed's chroma without the shade-90 bound, which shades 75–85 break.
  • "New palettes name v3" is broader than what ships, because packages/cli/assets/theme.template.ts:159 and the author-a-theme guide example still use astryx-oklch-v2.
  • PALETTE_RECIPE_V3 and PALETTE_RECIPE_NEWEST (palette) are outside the pull request's declared scope (none: the title has no conventional-commit scope and the body has no ## Scope / Components: line).
  • ThemePalette.recipe, ThemePaletteInput.recipe and the CLI's ThemePaletteGenerateResponse.data.recipe (theme) are outside the declared scope.
  • TonalPaletteCandidate.recipe (Core and CLI) is outside the declared scope.
  • TonalPaletteGenerationInput.recipe (Core and CLI) is outside the declared scope.
  • TonalPaletteNormalizedRequest.recipe (Core and CLI) is outside the declared scope.
  • The CLI's TonalPaletteGenerationReceipt.recipe is outside the declared scope.
  • The experimental theme editor's new-palette recipe default is outside the declared scope.

A ## Scope section with a Components: line naming these rows clears the last six findings, and the owner decision they need is the spec decision above.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • themePalette() gives accent and status icons the shade nearest the fill at 3:1: verified (mapping.ts:1386-1401; themePalette() output before and after)
  • Status dots are included: verified (StatusDot reads the icon tokens)
  • themePalette() and generateTonalPalette() accept v3: verified (themePalette.ts:99-100 reads the recipe list, which now has v3)
  • v3 keeps shade 90 and paler at or below the seed's chroma: verified (sampled across dusty seeds, vibrancy 0 to 100, light and dark)
  • The palette entry exports the two new recipe constants: verified (palette index)
  • A palette that names no recipe still runs v1: verified (themePalette.ts:99)
  • v1 and v2 draw the ramps they shipped with: verified (new v2 pin passes on the base and the head); icon tokens still move
  • The middle of a v3 ramp is drawn as v1 draws it: false (it is v2's)
  • v3 is v2 except shade 90 and paler: false (shades 75–85 move too)
  • New palettes, including the editor's, name v3: true for the editor; false for the theme template and the author guide
  • A palette keeps the recipe its config names: verified (editor plan; config test)
  • The editor's icons and status dots read at 3:1 nearer the fill: verified (new editor test; built theme with an exact warning fill)
  • FR19 gains one sentence for each rule: verified (spec diff)
  • The CLI engine matches Core's source: verified (check passes)
  • Changesets pass, and lint and formatting are clean on changed files: verified (0 lint errors; formatting clean)

Files:

  • .changeset/core-palette-icon-graphic-contrast.md: clear
  • .changeset/core-palette-recipe-v3.md: clear
  • .changeset/palette-recipe-v3.md: finding (middle-of-ramp claim; new-palette claim)
  • .changeset/status-dot-graphic-contrast.md: clear
  • docs/specs/AST-008/spec.md: awaiting spec approval
  • packages/cli/api/theme-edit/_palette.mjs: awaiting spec approval (editor default)
  • packages/cli/api/theme-edit/theme-palette-recipe.test.mjs: clear
  • packages/cli/api/theme-edit/theme-palette.test.mjs: clear
  • packages/cli/api/theme-edit/theme-status-dot-graphic-contrast.test.mjs: clear
  • packages/cli/api/theme/generateTonalPalette.doc.mjs: finding (pale-tint bound)
  • packages/cli/api/theme/palette/generate/generate.test.mjs: clear
  • packages/cli/api/theme/palette/generate/generator.mjs: finding (generated copy of the v1 comment)
  • packages/cli/api/theme/palette/generate/mapping.mjs: finding (generated copy of the note)
  • packages/cli/api/theme/palette/generate/recipe-v2.test.mjs: finding (comment says v1)
  • packages/cli/api/theme/palette/generate/types.mjs: clear
  • packages/cli/api/theme/theme.type.mjs: finding (pale-tint bound)
  • packages/cli/api/theme/themePaletteGenerate.doc.mjs: finding (pale-tint bound)
  • packages/cli/assets/docs/tree/generate-a-palette.doc.mjs: clear
  • packages/cli/clients/cli/commands/theme-palette-generate.doc.mjs: finding (pale-tint bound)
  • packages/core/src/palette/generator.ts: finding (comment says the middle is v1's)
  • packages/core/src/palette/index.ts: awaiting spec approval (new exports)
  • packages/core/src/palette/mapping.ts: finding (note misreports the icon shade)
  • packages/core/src/palette/types.ts: awaiting spec approval (widened returned unions)

Automated review (maintainer link)

Comment thread packages/core/src/palette/mapping.ts Resolved
Comment thread packages/core/src/palette/generator.ts Resolved
Comment thread .changeset/palette-recipe-v3.md Resolved
Comment thread packages/cli/api/theme/theme.type.mjs Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On hold: approval needs an engineering owner to approve the AST-008 FR19 amendment, and the blocking findings below need fixing.

FR19 says the theme editor names astryx-oklch-v2 for a new palette and sets no icon contrast rule, while this pull request moves the editor to the new astryx-oklch-v3 recipe and picks accent and status icons at 3:1, so an engineering owner (the author may, as one) records the decision by commenting /approve-spec <full head SHA>, settling whether the 3:1 icon rule also applies to palettes pinned to v1 or v2 and whether PALETTE_RECIPE_NEWEST, an alias later releases will move, should be public.

Blocking findings:

  • PALETTE_RECIPE_V3 and PALETTE_RECIPE_NEWEST (palette) are outside the pull request's declared scope, because the title names no conventional-commit scope and the body has no ## Scope section with a Components: line.
  • ThemePalette.recipe, ThemePaletteInput.recipe and the CLI's ThemePaletteGenerateResponse.data.recipe (theme) are outside the declared scope.
  • TonalPaletteCandidate.recipe (Core and CLI) is outside the declared scope.
  • TonalPaletteGenerationInput.recipe (Core and CLI) is outside the declared scope.
  • TonalPaletteNormalizedRequest.recipe (Core and CLI) is outside the declared scope.
  • The CLI's TonalPaletteGenerationReceipt.recipe is outside the declared scope.
  • The experimental theme editor's new-palette recipe default is outside the declared scope.

A ## Scope section with a Components: line naming these rows clears all seven, and the owner decision they need is the spec decision above. The earlier editor-note, v3-wording, CLI-doc and new-palette findings are fixed at this head, and two non-blocking wording suggestions are inline.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims:

  • themePalette() gives accent and status icons the shade nearest the fill that reads at 3:1: verified (mapping.ts:1382-1401; before and after frames)
  • Status dots are included: verified (StatusDot.tsx:90, :103, :116 read the icon tokens)
  • A warning icon stays nearer amber where warning text deepens: verified (bright warning icon #745b00 to #927300, text unchanged)
  • themePalette() and generateTonalPalette() accept v3: verified (themePalette.ts:99-100 checks the recipe list, which now holds v3; config test)
  • v3 keeps shade 90 and paler at or below the seed's chroma: verified (dusty-seed sweep, vibrancy 0 to 100, light and dark)
  • Up to shade 70 a v3 ramp is drawn as v2 draws it, and v3 changes shades 75 and paler: verified (ramp probe)
  • v3 is v2 with the shade-90 bound (description and Core release note): verified as narrower than the change, since shades 75 to 85 also move
  • The palette entry exports the two new recipe constants: verified (palette index.ts)
  • A palette that names no recipe still runs v1: verified (themePalette.ts:99)
  • v1 and v2 draw the ramps they shipped with, pinned by a new test: verified (v2 pin test passes); icon tokens still move
  • The theme editor names v3 for a new palette: verified (_palette.mjs:764; editor test)
  • A palette keeps the recipe its config names: verified (editor plan; config test)
  • The editor's icons and status dots read at 3:1 nearer the fill: verified (new editor test; editor probe)
  • FR19 gains one sentence for each rule: verified (spec diff)
  • The CLI engine matches Core's source: verified (check passes)
  • Changesets pass, and lint and formatting are clean on the changed files: verified (changeset check; 0 lint errors; formatting clean)

Files:

  • .changeset/core-palette-icon-graphic-contrast.md: clear
  • .changeset/core-palette-recipe-v3.md: clear (non-blocking wording suggestion)
  • .changeset/palette-recipe-v3.md: clear
  • .changeset/status-dot-graphic-contrast.md: clear
  • docs/specs/AST-008/spec.md: awaiting spec approval
  • packages/cli/api/theme-edit/_palette.mjs: awaiting spec approval (editor default); tag-along default
  • packages/cli/api/theme-edit/theme-palette-recipe.test.mjs: clear
  • packages/cli/api/theme-edit/theme-palette.test.mjs: clear
  • packages/cli/api/theme-edit/theme-role-text-follows-exact-fill.test.mjs: clear (stale header comment, non-blocking)
  • packages/cli/api/theme-edit/theme-status-dot-graphic-contrast.test.mjs: clear
  • packages/cli/api/theme/generateTonalPalette.doc.mjs: clear
  • packages/cli/api/theme/palette/generate/generate.test.mjs: clear
  • packages/cli/api/theme/palette/generate/generator.mjs: clear (generated copy)
  • packages/cli/api/theme/palette/generate/mapping.mjs: clear (generated copy of the comment suggestion)
  • packages/cli/api/theme/palette/generate/recipe-v2.test.mjs: clear (stale comment, non-blocking)
  • packages/cli/api/theme/palette/generate/types.mjs: finding (tag-along rows)
  • packages/cli/api/theme/theme.type.mjs: finding (tag-along rows)
  • packages/cli/api/theme/themePaletteGenerate.doc.mjs: clear
  • packages/cli/assets/docs/tree/generate-a-palette.doc.mjs: clear
  • packages/cli/clients/cli/commands/theme-palette-generate.doc.mjs: clear
  • packages/core/src/palette/generator.ts: awaiting spec approval (v3 recipe and exports)
  • packages/core/src/palette/index.ts: finding (tag-along rows)
  • packages/core/src/palette/mapping.ts: awaiting spec approval (icon rule); non-blocking comment suggestion
  • packages/core/src/palette/types.ts: finding (tag-along rows)

Automated review (maintainer link)

Comment on lines +1322 to +1323
// Accent text is the color given where it reads on what it sits on
// on (the surfaces and the tint), in each mode its fill is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this rewrite now reads "on what it sits on / on (the surfaces …)", the "they" two lines down no longer has a plural subject, and the block serves every role, not only accent. Suggested:

// Text keeps the exact fill color where it reads on the surfaces and the
// tint. Where it does not, it moves to the nearest shade that reads, and the
// check says so.

Then regenerate the CLI copy (mapping.mjs:1542-1545).

'@astryxdesign/core': patch
---

[feat] `@astryxdesign/core/palette`: `themePalette()` and `generateTonalPalette()` also take the `astryx-oklch-v3` recipe (v2, with a dusty seed's palest tints, shade 90 and paler, kept at or below its own chroma), and the entry exports `PALETTE_RECIPE_V3` and `PALETTE_RECIPE_NEWEST`. A palette that names no recipe still runs `astryx-oklch-v1`, and v1 and v2 draw what they shipped with.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the CLI note now says "Up to shade 70 a ramp is drawn as v2 draws it; v3 changes shades 75 and paler", but this Core note describes v3 only as v2 plus the shade-90 bound. Shades 75–85 move too (olive #66662e at shade 75: #bfbf61 in v2, #bebe6e in v3). Using the CLI wording here, and in the PR body, keeps the two release notes consistent.

@josephfarina
josephfarina force-pushed the core-palette-look-families branch from 25ff5c9 to 3050bce Compare November 21, 2026 05:11
@josephfarina josephfarina changed the title palette: recipe v3 and icons at 3:1 reach themePalette() palette: themePalette() gives the theme editor's colors (recipe v3, 3:1 icons, tinted inks, track, toast, coloured cards, the look's colors) Nov 21, 2026
…a coloured card keeps its ink, and a tinted gray's text is already off white

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On hold: approval needs an engineering owner to approve the AST-008 FR19 amendment, and the blocking findings below need fixing.

FR19 says the theme editor names astryx-oklch-v2 for a new palette and lists only the seeds' own tokens for themePalette(), while this pull request moves the editor to astryx-oklch-v3, picks icons at 3:1, and makes themePalette() write the look's colors, tinted inks, the track, the error toast fill and unlifted card text for every recipe, so existing v1 and v2 palette themes change on upgrade. An engineering owner records that decision by commenting /approve-spec <full head SHA> (the author may, as one), saying whether these rules apply to palettes pinned to v1 or v2 and whether PALETTE_RECIPE_NEWEST, an alias later releases will move, should be public.

Blocking findings:

  • With a tinted gray such as slate #64748b and no danger seed, the dark error toast's text becomes #eaf1fd at 4.14:1 on Core's #e3193b, under the 4.5:1 that #ffffff gave at 4.70:1, because --color-on-dark is drawn inside the ramp (packages/core/src/palette/mapping.ts:374-380).
  • The tinted-ink release notes and description say any tinted neutral seed tints the inks and only a pure gray keeps black and white, but a seed under OKLCH chroma 0.02, such as stone #78716c or zinc #71717a, keeps #000000 and #ffffff (mapping.ts:481-485).
  • .changeset/core-palette-track.md says --color-track is a progress bar's track, but ProgressBar's track is --color-background-muted; the token paints Slider's track and Spinner's ring.
  • The description says FR19 gains a sentence for each rule, but the accent-tint rule has none in the amendment.
  • ThemePalette.components (packages/core/src/palette/types.ts:190 and its CLI copy), DefineThemeInput.palette (packages/core/src/theme/defineTheme.ts:426-427) and the author-a-theme guide still say the palette lifts secondary text on coloured cards, which this pull request removes.
  • PALETTE_RECIPE_V3 and PALETTE_RECIPE_NEWEST (palette) are outside the pull request's declared scope, because the title names no conventional-commit scope and the body has no ## Scope section with a Components: line.
  • ThemePalette.recipe, ThemePaletteInput.recipe and the CLI's ThemePaletteGenerateResponse.data.recipe (theme) are outside the declared scope.
  • TonalPaletteCandidate.recipe (Core and CLI) is outside the declared scope.
  • TonalPaletteGenerationInput.recipe (Core and CLI) is outside the declared scope.
  • TonalPaletteNormalizedRequest.recipe (Core and CLI) is outside the declared scope.
  • The CLI's TonalPaletteGenerationReceipt.recipe is outside the declared scope.
  • The experimental theme editor's new-palette recipe default is outside the declared scope.

A ## Scope section with a Components: line naming these rows clears the last seven findings; the earlier editor-note, v3-wording, CLI-doc and new-palette findings stay fixed.

Claims and files checked

Review mode: full; reason: rebase

Claims (description):

  • themePalette() and defineTheme({palette}) give the editor's colors for the same seeds and recipe: not proven (one shared mapping source and a byte-checked CLI copy, but no test compares an editor-built theme with themePalette() output)
  • v3 is v2 with a dusty seed's palest tints (shade 90 and paler) at or below its chroma, and up to shade 70 a ramp is v2's: verified (the v3 recipe test; ramp probe)
  • A palette that names no recipe runs v1, and v1 and v2 draw what they shipped with: verified (themePalette.ts:100; ramp digest test)
  • The entry exports the two v3 constants and the editor names v3 for a new palette: verified (palette index.ts:17-19; _palette.mjs:1248)
  • Accent and status icons take the 3:1 shade nearest the fill: verified (every role icon reads 3:1 or more and moves toward its fill)
  • A tinted neutral seed's primary text, icons and on-dark text carry its tint, and a pure gray keeps black and white: false as stated (a stone or zinc gray keeps black and white below chroma 0.02)
  • The neutral seed reaches the slider track at the shade nearest Core's: verified (slate track #c8d6e9 against Core's #ccd3db)
  • The danger seed reaches the error toast fill at the shade nearest Core's: verified (#9c0045 against Core's #aa071e)
  • The accent tint moves under exact accent text and themePalette() output does not change: verified (accent tint unchanged in every probe; editor test)
  • A coloured card keeps its own secondary text: verified (no card part styles; that text reads 4.6:1 or more on every card fill)
  • The look's category, chart, code, scrim and unset status colors come from the seeds and read on Core's surfaces: verified for role and category text and icons on the surfaces
  • FR19 gains a sentence for each rule: false (the accent-tint rule has none)
  • A themePalette()-only import grows from about 18 KB to about 25 KB gzip: verified (18.2 KB to 25.3 KB)
  • One Core and one CLI patch changeset per rule: verified (8 and 8)

Claims (changesets):

  • Core card ink, families, icons, recipe v3, tint and toast notes: verified (probe, tests)
  • Core ink note: false as stated (stone and zinc grays keep black and white)
  • Core track note: false (a progress bar's track is not this token; a spinner's ring is)
  • CLI card ink, families, tint, toast, track, recipe v3 and status-dot notes: verified (12 changed CLI test files pass), families parity not proven by a test
  • CLI ink note: false as stated (same threshold)

Files:

  • .changeset/core-palette-card-ink.md: clear
  • .changeset/core-palette-families.md: clear
  • .changeset/core-palette-icon-graphic-contrast.md: clear
  • .changeset/core-palette-ink.md: finding (tinted-gray claim)
  • .changeset/core-palette-recipe-v3.md: clear (non-blocking wording)
  • .changeset/core-palette-tint.md: clear
  • .changeset/core-palette-toast.md: clear
  • .changeset/core-palette-track.md: finding (names the progress bar's track)
  • .changeset/experimental-theme-palette-card-ink.md: clear
  • .changeset/experimental-theme-palette-families.md: clear (parity not proven by a test)
  • .changeset/experimental-theme-palette-ink.md: finding (tinted-gray claim)
  • .changeset/experimental-theme-palette-tint.md: clear
  • .changeset/experimental-theme-palette-toast.md: clear
  • .changeset/experimental-theme-palette-track.md: clear
  • .changeset/palette-recipe-v3.md: clear
  • .changeset/status-dot-graphic-contrast.md: clear
  • docs/specs/AST-008/spec.md: awaiting spec approval (no accent-tint sentence)
  • packages/cli/api/theme-edit/_palette.mjs: awaiting spec approval (editor default); tag-along default
  • packages/cli/api/theme-edit/theme-change-leaves-unchecked-unreached.test.mjs: clear
  • packages/cli/api/theme-edit/theme-colors-reach-core-defaults.test.mjs: clear
  • packages/cli/api/theme-edit/theme-how-answer-wording.test.mjs: clear
  • packages/cli/api/theme-edit/theme-missed-step-lines.test.mjs: clear
  • packages/cli/api/theme-edit/theme-palette-recipe.test.mjs: clear
  • packages/cli/api/theme-edit/theme-palette.test.mjs: clear
  • packages/cli/api/theme-edit/theme-role-text-follows-exact-fill.test.mjs: clear
  • packages/cli/api/theme-edit/theme-status-dot-graphic-contrast.test.mjs: clear
  • packages/cli/api/theme-edit/theme-text-on-accent-tint.test.mjs: clear
  • packages/cli/api/theme-edit/theme-tinted-gray-ink.test.mjs: clear (does not check the toast pair)
  • packages/cli/api/theme/generateTonalPalette.doc.mjs: clear
  • packages/cli/api/theme/palette/generate/editor-look.mjs: clear (generated copy)
  • packages/cli/api/theme/palette/generate/generate.test.mjs: clear
  • packages/cli/api/theme/palette/generate/generator.mjs: clear (generated copy)
  • packages/cli/api/theme/palette/generate/mapping.mjs: finding (generated copy of the on-dark tint)
  • packages/cli/api/theme/palette/generate/recipe-v2.test.mjs: clear (the removed v2 pin is covered by the digest test)
  • packages/cli/api/theme/palette/generate/types.mjs: finding (coloured-card doc; tag-along rows)
  • packages/cli/api/theme/theme.type.mjs: finding (tag-along rows)
  • packages/cli/api/theme/themePaletteGenerate.doc.mjs: clear
  • packages/cli/assets/docs/tree/generate-a-palette.doc.mjs: clear
  • packages/cli/clients/cli/commands/theme-palette-generate.doc.mjs: clear
  • packages/core/src/palette/editor-look.ts: clear
  • packages/core/src/palette/generator.ts: awaiting spec approval (recipe v3)
  • packages/core/src/palette/index.ts: finding (tag-along rows)
  • packages/core/src/palette/mapping.ts: finding (on-dark tint under 4.5:1 on the dark error toast); awaiting spec approval
  • packages/core/src/palette/themePalette.test.ts: clear
  • packages/core/src/palette/themePalette.ts: awaiting spec approval (the look's colors)
  • packages/core/src/palette/types.ts: finding (coloured-card doc; tag-along rows)

Automated review (maintainer link)

'--color-icon-primary',
// Text on a dark surface (a toast, a card over the scrim): tinted with
// the surface it sits on.
'--color-on-dark',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--color-on-dark is the text of the error toast too. With a slate gray (#64748b) and no danger seed, the palette leaves the toast fill at Core's dark #e3193b, and this tint gives the text #eaf1fd at 4.14:1 there (white gave 4.70:1; Toast keeps the dark side because --color-on-light reads only 4.03:1). Suggest tinting --color-on-dark only to a shade that reads at 4.5:1 on every inverted fill it sits on, the palette's or Core's (--color-background-inverted, --color-background-error-inverted), and keeping the ramp's end otherwise. The comment at line 1190 ("which always reads") then holds.

'@astryxdesign/core': patch
---

[feat] `@astryxdesign/core/palette`: `themePalette()` draws a tinted `neutral` seed's primary text, primary icons and `--color-on-dark` inside its ramp, so they carry the gray's tint instead of pure black and white. A pure gray keeps black and white.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule runs only when !isGray(seed), OKLCH chroma 0.02 or more (mapping.ts:481-485), so a stone #78716c (0.012) or zinc #71717a (0.014) keeps pure black and white. Suggest: "draws the primary text, primary icons and --color-on-dark of a neutral seed with OKLCH chroma of 0.02 or more (a slate, not a stone or zinc gray) inside its ramp". The same applies to the CLI note and the FR19 sentence.

'@astryxdesign/core': patch
---

[feat] `@astryxdesign/core/palette`: `themePalette()` with a `neutral` seed sets `--color-track` (a slider's and a progress bar's track) at the gray's shade nearest Core's own track color, so a warm or cool gray reaches it as it reaches the surfaces.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProgressBar's track is --color-background-muted (ProgressBar.tsx:265-268); --color-track paints Slider's track (Slider.tsx:333, :531) and Spinner's ring (Spinner.tsx:337, :341). Suggest "(a slider's track and a spinner's ring)".

readonly recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2' | 'astryx-oklch-v3';
/** Each color token's `[light, dark]` value. */
readonly tokens: Readonly<Record<string, readonly [string, string]>>;
/** Part styles that lift secondary text on the accent tint, the neutral track and the coloured cards, as the official themes do, by part and style key. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

components no longer holds coloured cards (LIFT_PARTS drops card variant:*), so this doc, its CLI copy (types.mjs:120), DefineThemeInput.palette (theme/defineTheme.ts:426-427) and the author-a-theme guide (author-a-theme.doc.mjs:46) promise part styles a caller no longer gets. Suggest dropping "and the coloured cards" in all four.

This branch was successfully deployed

1 active deployment
Preview — 170ead26 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant