Skip to content

Adopt reviewed Butter color palette - #7672

Merged
rubyycheung merged 1 commit into
mainfrom
ruby/butter-reviewed-palette
Oct 22, 2026
Merged

rubyycheung merged 1 commit into
mainfrom
ruby/butter-reviewed-palette

Conversation

@rubyycheung

@rubyycheung rubyycheung commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Butter now uses one reviewed, reproducible Light/Dark palette across its existing semantic, categorical, syntax, effect, shadow, and component colors. Signature brand Blue #225BFF, Butter Yellow #FDEE8C, and warm body surfaces remain exact. Green, Red, and the other generated families use smooth monotonic ramps.

The released public butterPalettes object remains byte-identical in its original export location. It is a frozen compatibility snapshot; the complete generated mode-aware palette is private Butter authoring data, and the maintained theme imports only selected Butter stops.

This pull request is stacked on Matcha #7671. Shared generation tooling comes from color-neutral maintenance PR #7678; Butter does not import another theme's palette values.

Visual authority

  • The Butter palette and mapping direction were owner-reviewed in Light and Dark modes.
  • theme:butter records the approved palette, mappings, compatibility, and evidence at this exact head.

Before and after

Raw palette

Reviewed Butter light and dark palette

Existing roles mapped to named palette stops

Current and mapped Butter token colors

Real Astryx components

The same Astryx component tree is rendered before and after with inputs, banners, semantic and categorical badges, buttons, and progress bars. The refreshed exact-head evidence also captures Butter's final status foreground changes.

Butter real-component before and after

State matrix

  • Light and Dark mode ramps
  • Signature Blue and Yellow accents
  • Semantic surfaces, text, icons, borders, overlays, effects, and statuses
  • All nine categorical families
  • Success, warning, error, and info badges, banners, field status, progress, and input states
  • Syntax foregrounds and background
  • Data-visualization tokens remain untouched

Accessibility evidence

All maintained normal-sized text pairings changed in this review now clear 4.5:1:

  • Info Badge, Banner, and FieldStatus: Neutral Light 15 #1D1C11 on Accent Light 55 #4D82FF — 4.85:1
  • Error Badge, Banner, and FieldStatus: Neutral Light 15 #1D1C11 on Red Light 60 #E56241 — 5.02:1
  • Neutral Badge: Accent Light 35 #194CE8 on Butter Yellow #FDEE8C — 5.49:1
  • Light TopNav default: Accent Light 40 #225BFF on warm navigation surface #FDFBE4 — 5.01:1
  • Light TopNav selected: Accent Light 35 #194CE8 on warm navigation surface #FDFBE4 — 6.20:1

Visible labels and status icons continue to identify semantic states independently of color.

Scope

  • Appearance is the primary intent.
  • Behavior, public API, interaction, typography, spacing, radii, motion, and shadow geometry are unchanged.
  • The unchanged public palette remains byte-identical; no consumer migration is required.
  • The README regeneration command runs through the Butter package with package-relative paths.
  • The Sandbox palette page and visual evidence use the maintained private mode-aware ramps, not the frozen public compatibility snapshot.
  • The evidence shows changed pixels rendered through real Astryx components.
  • Public text and artifacts contain no internal Meta context.

Consumers that need the former appearance can extend butterTheme and override the affected color, syntax, shadow, and component values with their previous values.

Overlap review

Searched the stack's open theme-palette work and affected Butter symbols/paths. The only overlapping open work is the shared selected-reference and receipt infrastructure in #7678 and #7679, which Butter consumes without changing. Gothic #7670 and Matcha #7671 own separate theme packages; Y2K #7675 is the direct descendant and was restacked after this update. No competing Butter palette or component mapping change was found.

Testing

  • pnpm vitest run packages/themes/butter/src/butterPalettes.test.ts packages/themes/butter/src/butterTheme.test.ts packages/themes/butter/src/butterColorMapping.test.ts scripts/generate-butter-palette-refs.test.mjs scripts/palette-receipt-test-utils.test.mjs — 17 tests passed
  • Butter selected-reference drift check — 102 stops in sync
  • pnpm -F @astryxdesign/theme-butter build
  • pnpm check:knowledge
  • pnpm check:changesets
  • ESLint and Prettier on every changed source and record
  • Complete released butterPalettes object is locked by snapshot equality
  • Package and CLI-template theme and selected references remain synchronized
  • Browser-rendered exact-head palette, token, and real-component evidence in Chromium

The Sandbox package-wide typecheck still reports the pre-existing unrelated doc-preview/SectionRenderer.tsx ReferenceDocBlock / ReferenceContentBlock error; the changed Butter page itself introduces no reported type error.

Writing rubric results

  • R1 narration: change/history/scope narration was found and rewritten or removed; the record now states durable behavior in present tense.
  • R2 research: none; visual comparisons remain PR evidence rather than standing record content.
  • R3 evidence: verification names tests, artifacts, and observable facts rather than changes.
  • R4 rejected alternatives: each is one line inside its owning decision.
  • R5 change references: none in the record.
  • R6 open questions: OQ1 records the unresolved dependency on a current cross-theme contrast-methodology owner.

@vercel

vercel Bot commented Oct 17, 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 Oct 22, 2026 9:52pm UTC

Request Review

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

astracat-bot Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Oct 22, 2026, 9:44 PM UTC

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Previews ready: Storybook and Sandbox were built with this PR's docsite. CI evidence will be added when available.

View Storybook for this PR · View Sandbox for this PR

@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.

This change is on hold for a maintainer decision: Butter has no current theme record, so approval needs a maintainer to provide or identify the governing spec that ratifies this palette request and its token and component mapping, including the new success, warning, error and info fills. Separately from that decision, please address the points below.

  • The new receipt test in scripts/generate-butter-palette-refs.test.mjs fails under Node 24 because full-precision float diagnostics differ in their last digits; compare those numbers with a tolerance and the rest of the receipt exactly.
  • The change has 2,121 authored lines; landing the unchanged butterPalettes extraction separately would bring it under 2,000.
  • The Changeset should name the old and new appearance and how to keep the old look by extending butterTheme.
  • The README’s regeneration command fails as written, because astryx is not a root binary and the CLI rejects the absolute --preview path.

[Automated review]

'utf8',
),
),
).toEqual(

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.

This exact comparison fails under Node 24.20.0: the regenerated palette matches byte for byte, but seven full-precision receipt diagnostics differ in their last digits (for example accent.dark.minimumAdjacentDeltaE is 2.6446742601015836 committed and 2.6446742601015796 regenerated). Comparing request, candidateSha256 and the non-numeric fields exactly, and the numeric diagnostics with a tolerance (or rounding them when the receipt is written), keeps this reproducibility check meaningful across environments.

Comment thread packages/themes/butter/README.md Outdated
Comment on lines +44 to +48
pnpm exec astryx theme palette generate \
packages/themes/butter/palette.config.json \
--out packages/themes/butter/src/butterPalettes.generated.ts \
--preview /tmp/butter-palette-preview.html \
--overwrite

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.

As written this fails from the repository root: pnpm exec astryx is not found because the root has no astryx binary, and the CLI rejects --preview /tmp/... because absolute paths are not allowed. A package-relative invocation works and reproduces the committed palette:

pnpm -F @astryxdesign/theme-butter exec astryx theme palette generate palette.config.json \
  --out src/butterPalettes.generated.ts \
  --preview butter-palette-preview.html \
  --overwrite

Comment thread .changeset/butter-reviewed-palette.md Outdated
'@astryxdesign/cli': patch
---

[feat] Adopt the reviewed Butter light-and-dark palette and map Butter-owned color roles to named palette stops while preserving the existing public palette API shape.

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.

spec:AST-017 FR3 asks a visual [feat] Changeset to name the old and new appearance and how to keep the old look when a supported escape exists. Naming the main shifts (status fills such as success #91D143→#7bbf7a and warning #ffc502→#dfcf5b, plus the Red, Green and Yellow categorical colors) and noting that extending butterTheme with token and component overrides keeps the previous look would satisfy it.

Comment thread packages/themes/butter/src/source.ts Outdated

export {butterTheme, butterPalettes} from './butterTheme';
export {butterTheme} from './butterTheme';
export {butterPalettes} from './butterPalettes';

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.

Together with the new butterPalettes.ts and the 343-line removal from butterTheme.ts, this unchanged extraction accounts for 675 of the 2,121 authored lines. Landing it in its own pull request first (or keeping the export in butterTheme.ts and scoping the literal-free source test to the token map) would bring the palette change under 2,000 authored lines.

@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.

This change is on hold for a maintainer decision: Butter has no current theme record on main, so approval needs a maintainer to approve the proposed theme:butter record, or say what should change, covering the exact palette request and ramps (including the yellow-to-brown flag the generator reports on Butter Neutral), the token and component mapping with its new status fills, and the recorded contrast exceptions. Separately from that decision, please address the points below.

  • The "Reviewed Butter light and dark palette" image shows a Brand Blue ramp this head does not generate (stop 55 #4883fd and stop 60 #6e92ff instead of #4d82ff and #5a8cff); it and the component image also crop dark mode and the token image stops before the changed roles, so please republish full-height light and dark images from the committed config.
  • The README regeneration command fails from both the repository root and the package directory, while pnpm -F @astryxdesign/theme-butter exec astryx theme palette generate palette.config.json --out src/butterPalettes.generated.ts --preview .tmp-butter-palette-preview.html --overwrite reproduces the committed palette.
  • The comment above butterPalettes still says the theme consumes those ramps and points to the old generator, so please describe it as the frozen released snapshot.

[Automated review]

Comment thread packages/themes/butter/README.md Outdated
Comment on lines +44 to +48
pnpm exec astryx theme palette generate \
packages/themes/butter/palette.config.json \
--out packages/themes/butter/src/butterPalettes.generated.ts \
--preview .tmp-butter-palette-preview.html \
--overwrite

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.

As written this fails: from the repository root pnpm exec astryx is not found, and from packages/themes/butter the CLI reports Palette config not found: packages/themes/butter/palette.config.json. A package-relative invocation works and reproduces the committed candidate:

pnpm -F @astryxdesign/theme-butter exec astryx theme palette generate palette.config.json \
  --out src/butterPalettes.generated.ts \
  --preview .tmp-butter-palette-preview.html \
  --overwrite

Comment thread packages/themes/butter/butter.spec.md Outdated
Comment on lines +93 to +98
The Badge component uses the same fixed pairings in both modes. Known exceptions
are:

- info Badge text (`#ffffff` on `#4d82ff`) at 3.53:1;
- error Badge text (`#ffffff` on `#e56241`) at 3.41:1; and
- neutral Badge text (`#225bff` on `#fdee8c`) at 4.44:1.

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.

These are the Badge pairings, but Banner status:info (#ffffff on #4d82ff, 3.53:1), Banner status:error and FieldStatus type:error (#ffffff on #e56241, 3.41:1) use the same fixed pairings for their text. spec:AST-008 FR12 also asks theme evidence to name the text size and component state, so listing those pairings with their size and state would keep the record's known gaps complete.

@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.

This change is on hold for a maintainer decision: Butter has no current theme record on main, so approval needs a maintainer to approve the proposed theme:butter record, or say what should change, covering the exact palette request and ramps (including the yellow-to-brown flag the generator reports on Butter Neutral), the token and component mapping with its new status fills, and the recorded contrast exceptions. Separately from that decision, please address these points:

  • The record's contrast exceptions list only Badge pairs, while Banner status:info and status:error, FieldStatus type:error and the light top-nav item also put text below 4.5:1, and no entry names its text size, state or non-color cues.
  • The palette image in the description shows a Brand Blue ramp this head does not generate (stop 55 #4883fd and stop 60 #6e92ff instead of #4d82ff and #5a8cff) and no dark mode, so please republish it from the committed config.
  • The README regeneration command fails from both the repository root and the package directory, while pnpm -F @astryxdesign/theme-butter exec astryx theme palette generate palette.config.json --out src/butterPalettes.generated.ts --preview .tmp-butter-palette-preview.html --overwrite reproduces the committed palette.
  • The comment above butterPalettes and the sandbox Butter palette page still present the frozen ramps as the ones the theme uses.
  • Please add the overlap search for the new record (search terms, canonical owner path, overlapping open work) to the description.

[Automated review]

Comment thread packages/themes/butter/README.md Outdated
Comment on lines +44 to +48
pnpm exec astryx theme palette generate \
packages/themes/butter/palette.config.json \
--out packages/themes/butter/src/butterPalettes.generated.ts \
--preview .tmp-butter-palette-preview.html \
--overwrite

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.

As written this fails: from the repository root pnpm exec astryx is not found, and from packages/themes/butter the CLI reports Palette config not found: packages/themes/butter/palette.config.json. Running it through the package with package-relative paths reproduces the committed candidate:

pnpm -F @astryxdesign/theme-butter exec astryx theme palette generate palette.config.json \
  --out src/butterPalettes.generated.ts \
  --preview .tmp-butter-palette-preview.html \
  --overwrite

Comment thread packages/themes/butter/butter.spec.md Outdated
Comment on lines +93 to +98
The Badge component uses the same fixed pairings in both modes. Known exceptions
are:

- info Badge text (`#ffffff` on `#4d82ff`) at 3.53:1;
- error Badge text (`#ffffff` on `#e56241`) at 3.41:1; and
- neutral Badge text (`#225bff` on `#fdee8c`) at 4.44:1.

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.

These are the Badge pairings, but Banner status:info (#ffffff on #4d82ff, 3.53:1), Banner status:error and FieldStatus type:error (#ffffff on #e56241, 3.41:1) render the same fixed pairs, and the light top-nav item text (#5a8cff) is 3.03:1 on the body. Listing every pairing below the 4.5:1 bar with its text size, component state, mode and non-color cues would keep the record's known gaps complete.


Butter keeps its creamy neutral canvas, signature Blue and Yellow, and playful
categorical identity in complete private light and dark ramps. Request,
generated result, receipt, and visual evidence change together.

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 published palette image does not show this head's palette: its Brand Blue ramp has stop 55 #4883fd and stop 60 #6e92ff where the committed palette has #4d82ff and #5a8cff, and, like the component image, it omits dark mode. Regenerating the preview from the committed config and republishing full-height light and dark images would keep the request, result and visual evidence together as this decision says.

@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.

This change is on hold for a maintainer decision: Butter has no current theme record on main, so approval needs a maintainer to approve the proposed theme:butter record at this head, or say what should change, covering the palette request and its ramps (including the yellow-to-brown flag the generator reports on Butter Neutral), the new status fills and the new status text colours. The Badge contrast guard now passes with the Butter entries removed, and no other changes are requested. When that decision is made, it should also settle whether the record lists the light-mode warning and success status icons and ProgressBar fills, which stay under 3:1 against their backgrounds as they do today.

[Automated review]

@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.

This change is on hold for a maintainer decision: Butter has no current theme record on main, so approval needs a maintainer to approve the proposed theme:butter record at this head, or say what should change, covering the palette request and its ramps (including the yellow-to-brown flag the generator reports on Butter Neutral), the new status fills and the new status text colours. The pull request's own change is the same as at the previous head, every Butter test and guard passes, and no other changes are requested. When that decision is made, it should also settle whether the record lists the light-mode warning and success status icons and ProgressBar fills, which stay under 3:1 against their backgrounds as they do today.

[Automated review]

@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.

This change is on hold for a maintainer decision: Butter has no current theme record on main, so approval needs a maintainer to approve the proposed theme:butter record at this head, or say what should change, covering the palette request and its ramps (including the yellow-to-brown flag the generator reports on Butter Neutral), the new status fills and the new status text colours. The pull request's own change is the same as at the previous head, every Butter test and guard passes, and no other changes are requested. When that decision is made, it should also settle whether the record lists the light-mode warning and success status icons and ProgressBar fills, which stay under 3:1 against their backgrounds as they do today, and the light TopNav's selected state, which now differs from the default mostly by font weight.

[Automated review]

@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.

This change is on hold for a maintainer decision: Butter has no current theme record on main, so approval needs a maintainer to approve the proposed theme:butter record at this head, or say what should change, covering the palette request and its ramps (including the yellow-to-brown flag the generator reports on Butter Neutral), the new status fills and the new status text colours. Separately, please point the Palette Generator Lab's Butter reference (apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts) at the generated palette, as the Stone and Gothic references already are, because it still compares against the frozen legacy ramps Butter no longer renders. Every Butter test, the selected-refs check and the package build pass.

[Automated review]

import {VStack} from '@astryxdesign/core/Layout';
import {butterTheme} from '@astryxdesign/theme-butter/built';
import {butterPalettes} from '@astryxdesign/theme-butter';
import {palette as butterModePalettes} from '../../../../../../../packages/themes/butter/src/butterPalettes.generated';

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.

This page now reads the generated mode-aware ramps, but the Palette Generator Lab's Butter reference (apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts L295–324) still builds from the frozen butterPalettes export plus butterDarkYellow, while the Lab README (L15–17) says it uses the same palette objects as this page. Building butterFamilies from butterPalettes.generated, as stoneFamilies does, keeps the Lab's Butter comparison in step with what Butter renders.

@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.

This change is on hold for a maintainer decision: Butter has no current theme record on main, so approval needs a maintainer to approve the proposed theme:butter record at this head, or say what should change, covering the palette request and its ramps (including the yellow-to-brown flag the generator reports on Butter Neutral), the new status fills and the new status text colours. The Palette Generator Lab now compares against the generated ramps, so the earlier point is resolved, and no other changes are requested. Every Butter test, the selected-refs check and the package build pass.

[Automated review]

@rubyycheung

Copy link
Copy Markdown
Contributor Author

/approve-spec e5ecd61

@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.

I recommend approving this change: the new theme:butter record is approved for this exact head through the spec-owner gate, and the theme, its generated palette, the CLI template copies and the docs all match it. Every Butter test and guard, the selected-refs check and the package build pass, and the palette, receipt, snapshot and template bundle each regenerate identically from the committed request. One note for future palette edits: the light-mode success and warning input rims and ProgressBar fills still sit under 3:1, as they did before this change, and the record does not list them as known gaps.

[Automated review]

@rubyycheung
rubyycheung force-pushed the ruby/matcha-reviewed-palette branch from 5cc150f to c704736 Compare October 22, 2026 21:27
Summary: Add a reproducible light-and-dark Butter palette, map Butter-owned color roles to selected stops, preserve the legacy public palette object unchanged, and synchronize the package and CLI template. Signature blue and yellow remain exact; Green, Red, and the rest of the generated ramps stay smooth.

Test Plan: 40 focused palette, mapping, contrast, and compatibility tests; config-to-candidate and receipt reproduction; selected-reference drift check; Butter package build; all first-party theme builds; build and lab package builds; full sandbox build; changed-file ESLint and Prettier; changeset validation; package/template byte parity; independent review; browser-rendered raw palette, token mapping, and real-component comparison.

Reviewers:

Subscribers:

Tasks:

Tags:
@rubyycheung
rubyycheung force-pushed the ruby/butter-reviewed-palette branch from e5ecd61 to de79839 Compare October 22, 2026 21:43
@rubyycheung
rubyycheung changed the base branch from ruby/matcha-reviewed-palette to main October 22, 2026 21:43
@rubyycheung

Copy link
Copy Markdown
Contributor Author

/approve-spec de79839

@rubyycheung
rubyycheung merged commit 39f7153 into main Oct 22, 2026
64 checks passed
@github-actions
github-actions Bot deleted the ruby/butter-reviewed-palette branch October 23, 2026 06:23

This branch was successfully deployed

1 active deployment
Preview — de79839f Deployed Oct 22, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant