An open source design system that's fully customizable and agent ready
TypeScript
Adopt reviewed Butter palette (#7672)
rubyycheung39f715386e39
diff --git a/.changeset/butter-reviewed-palette.md b/.changeset/butter-reviewed-palette.mdnew file mode 100644index 0000000000..ad40656b3e--- /dev/null+++ b/.changeset/butter-reviewed-palette.md@@ -0,0 +1,8 @@+---+'@astryxdesign/theme-butter': patch+'@astryxdesign/cli': patch+---++[feat] Keep Butter's released `butterPalettes` object byte-identical while moving the maintained Light/Dark theme to reviewed named palette stops. Signature Blue `#225BFF`, Butter Yellow `#FDEE8C`, and warm body surfaces remain exact; status fills move from success `#91D143` to `#7BBF7A`, warning `#FFC502` to `#DFCF5B`, error `#FC473B` to `#E56241`, and info `#4883FD` to `#4D82FF`. Info and error content changes from white to warm Neutral `#1D1C11`, the neutral Badge uses Blue `#194CE8`, and light TopNav items use Blue `#225BFF` / `#194CE8`; these palette-first pairs clear normal-text AA. Consumers that need the former appearance can extend `butterTheme` and override the affected color, syntax, shadow, and component values with their previous values. The CLI template ships the same private palette request, receipt, and runtime-sized references.++@rubyycheungdiff --git a/apps/sandbox/src/app/(fullscreen)/pages/butter-palette/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/butter-palette/page.tsxindex e7a20e0aec..d20af73492 100644--- a/apps/sandbox/src/app/(fullscreen)/pages/butter-palette/page.tsx+++ b/apps/sandbox/src/app/(fullscreen)/pages/butter-palette/page.tsx@@ -4,43 +4,84 @@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';import {ThemePalettePreview} from '@/components/ThemePalettePreview';+import type {TonalColor} from '@/components/ThemePalettePreview';const SARINA = "'Sarina', cursive";-// 14 brand palettes shown in the design spec. Tonal ramps come straight-// from the theme's pre-computed palette so the displayed strip exactly-// matches the card / badge / banner tokens.-const TONAL_COLORS = [- {name: 'Accent', sourceHex: '#225BFF', tones: butterPalettes.accent, dark: {sourceHex: '#FDEE8C', tones: butterPalettes.yellow}},- {name: 'Gray', sourceHex: '#868B99', tones: butterPalettes.neutral},- {name: 'Red', sourceHex: '#FF7553', tones: butterPalettes.red},- {name: 'Orange', sourceHex: '#FFA347', tones: butterPalettes.orange},- {name: 'Yellow', sourceHex: '#EDD64B', tones: butterPalettes.yellow, dark: {sourceHex: '#EDD64B', tones: {0:'#000000',5:'#161100',10:'#211b00',15:'#2c2600',20:'#383100',25:'#443c00',30:'#504700',35:'#5d5300',40:'#6a5f00',45:'#786b00',50:'#867800',55:'#948500',60:'#a29200',65:'#b19f00',70:'#bfac1a',75:'#ceba2c',80:'#ddc73c',85:'#ecd54a',90:'#fbe358',95:'#fff1bd',100:'#ffffff'}}},- {name: 'Green', sourceHex: '#5DCE5F', tones: butterPalettes.green},- {name: 'Cyan', sourceHex: '#60CFD3', tones: butterPalettes.cyan},- {name: 'Teal', sourceHex: '#6CD9A8', tones: butterPalettes.teal},- {name: 'Blue', sourceHex: '#5681FF', tones: butterPalettes.blue},- {name: 'Purple', sourceHex: '#B780F6', tones: butterPalettes.purple},- {name: 'Pink', sourceHex: '#F680E8', tones: butterPalettes.pink},+// Pass Butter's reviewed mode-aware ramps so the preview and audit drawer show+// the palette the maintained theme actually consumes, not the frozen public+// compatibility snapshot.+const TONAL_COLORS: TonalColor[] = [{- name: 'Error',- sourceHex: '#FF5947',- tones: butterPalettes.error,+ name: 'Brand Blue',+ sourceHex: '#225BFF',+ tones: butterModePalettes.accent.light,+ dark: {tones: butterModePalettes.accent.dark},+ },+ {+ name: 'Butter Neutral',+ sourceHex: '#79786A',+ tones: butterModePalettes.neutral.light,+ dark: {tones: butterModePalettes.neutral.dark},+ },+ {+ name: 'Red',+ sourceHex: '#FF7553',semantic: 'Error',+ tones: butterModePalettes.red.light,+ dark: {tones: butterModePalettes.red.dark},},{- name: 'Warning',- sourceHex: '#F8C726',- tones: butterPalettes.warning,+ name: 'Orange',+ sourceHex: '#FFA347',+ tones: butterModePalettes.orange.light,+ dark: {tones: butterModePalettes.orange.dark},+ },+ {+ name: 'Butter Yellow',+ sourceHex: '#FDEE8C',semantic: 'Warning',+ tones: butterModePalettes.yellow.light,+ dark: {tones: butterModePalettes.yellow.dark},},{- name: 'Success',- sourceHex: '#91D143',- tones: butterPalettes.success,+ name: 'Green',+ sourceHex: '#5DCE5F',semantic: 'Success',+ tones: butterModePalettes.green.light,+ dark: {tones: butterModePalettes.green.dark},+ },+ {+ name: 'Cyan',+ sourceHex: '#60CFD3',+ tones: butterModePalettes.cyan.light,+ dark: {tones: butterModePalettes.cyan.dark},+ },+ {+ name: 'Teal',+ sourceHex: '#6CD9A8',+ tones: butterModePalettes.teal.light,+ dark: {tones: butterModePalettes.teal.dark},+ },+ {+ name: 'Blue',+ sourceHex: '#5681FF',+ tones: butterModePalettes.blue.light,+ dark: {tones: butterModePalettes.blue.dark},+ },+ {+ name: 'Purple',+ sourceHex: '#B780F6',+ tones: butterModePalettes.purple.light,+ dark: {tones: butterModePalettes.purple.dark},+ },+ {+ name: 'Pink',+ sourceHex: '#F680E8',+ tones: butterModePalettes.pink.light,+ dark: {tones: butterModePalettes.pink.dark},},];diff --git a/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts b/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.tsindex 3c06e58527..29447b515e 100644--- a/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts+++ b/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts@@ -1,6 +1,6 @@// Copyright (c) Meta Platforms, Inc. and affiliates.-import {butterPalettes} from '@astryxdesign/theme-butter';+import {palette as butterModePalettes} from '../../../../../../../packages/themes/butter/src/butterPalettes.generated';import {palette as gothicModePalettes} from '../../../../../../../packages/themes/gothic/src/gothicPalettes.generated';import {palette as stoneModePalettes} from '../../../../../../../packages/themes/stone/src/stonePalettes.generated';import {y2kPalettes} from '@astryxdesign/theme-y2k';@@ -268,59 +268,95 @@ const y2kFamilies = [storedFamily('teal', 'Teal', '#78e0b0', y2kPalettes.teal),];-const butterDarkYellow = {- 0: '#000000',- 5: '#161100',- 10: '#211b00',- 15: '#2c2600',- 20: '#383100',- 25: '#443c00',- 30: '#504700',- 35: '#5d5300',- 40: '#6a5f00',- 45: '#786b00',- 50: '#867800',- 55: '#948500',- 60: '#a29200',- 65: '#b19f00',- 70: '#bfac1a',- 75: '#ceba2c',- 80: '#ddc73c',- 85: '#ecd54a',- 90: '#fbe358',- 95: '#fff1bd',- 100: '#ffffff',-} as const;-const butterFamilies = [storedFamily('accent','Accent','#225bff',- butterPalettes.accent,+ butterModePalettes.accent.light,+ 'chromatic',+ butterModePalettes.accent.dark,+ ),+ storedFamily(+ 'neutral',+ 'Gray',+ '#868b99',+ butterModePalettes.neutral.light,+ 'neutral',+ butterModePalettes.neutral.dark,+ ),+ storedFamily(+ 'red',+ 'Red',+ '#ff7553',+ butterModePalettes.red.light,'chromatic',- butterPalettes.yellow,+ butterModePalettes.red.dark,+ ),+ storedFamily(+ 'orange',+ 'Orange',+ '#ffa347',+ butterModePalettes.orange.light,+ 'chromatic',+ butterModePalettes.orange.dark,),- storedFamily('neutral', 'Gray', '#868b99', butterPalettes.neutral, 'neutral'),- storedFamily('red', 'Red', '#ff7553', butterPalettes.red),- storedFamily('orange', 'Orange', '#ffa347', butterPalettes.orange),storedFamily('yellow','Yellow','#edd64b',- butterPalettes.yellow,+ butterModePalettes.yellow.light,+ 'chromatic',+ butterModePalettes.yellow.dark,+ ),+ storedFamily(+ 'green',+ 'Green',+ '#5dce5f',+ butterModePalettes.green.light,+ 'chromatic',+ butterModePalettes.green.dark,+ ),+ storedFamily(+ 'cyan',+ 'Cyan',+ '#60cfd3',+ butterModePalettes.cyan.light,+ 'chromatic',+ butterModePalettes.cyan.dark,+ ),+ storedFamily(+ 'teal',+ 'Teal',+ '#6cd9a8',+ butterModePalettes.teal.light,+ 'chromatic',+ butterModePalettes.teal.dark,+ ),+ storedFamily(+ 'blue',+ 'Blue',+ '#5681ff',+ butterModePalettes.blue.light,+ 'chromatic',+ butterModePalettes.blue.dark,+ ),+ storedFamily(+ 'purple',+ 'Purple',+ '#b780f6',+ butterModePalettes.purple.light,+ 'chromatic',+ butterModePalettes.purple.dark,+ ),+ storedFamily(+ 'pink',+ 'Pink',+ '#f680e8',+ butterModePalettes.pink.light,'chromatic',- butterDarkYellow,+ butterModePalettes.pink.dark,),- storedFamily('green', 'Green', '#5dce5f', butterPalettes.green),- storedFamily('cyan', 'Cyan', '#60cfd3', butterPalettes.cyan),- storedFamily('teal', 'Teal', '#6cd9a8', butterPalettes.teal),- storedFamily('blue', 'Blue', '#5681ff', butterPalettes.blue),- storedFamily('purple', 'Purple', '#b780f6', butterPalettes.purple),- storedFamily('pink', 'Pink', '#f680e8', butterPalettes.pink),- storedFamily('error', 'Error', '#ff5947', butterPalettes.error),- storedFamily('warning', 'Warning', '#f8c726', butterPalettes.warning),- storedFamily('success', 'Success', '#91d143', butterPalettes.success),];export const THEME_REFERENCES: ThemeReference[] = [diff --git a/docs/themes/README.md b/docs/themes/README.mdindex 6d4f3040b3..77d7ca52c0 100644--- a/docs/themes/README.md+++ b/docs/themes/README.md@@ -17,6 +17,7 @@ Current records:- [Stone](../../packages/themes/stone/stone.spec.md) — current- [Gothic](../../packages/themes/gothic/gothic.spec.md) — current- [Matcha](../../packages/themes/matcha/matcha.spec.md) — current+- [Butter](../../packages/themes/butter/butter.spec.md) — currentA theme record sits between system theming architecture and consumer/componentrecords. It uses one typed `references` list for architecture, design, system,diff --git a/package.json b/package.jsonindex e521749022..532fb50b04 100644--- a/package.json+++ b/package.json@@ -15,6 +15,8 @@"check:gothic-palette-refs": "node scripts/generate-gothic-palette-refs.mjs --check","generate:matcha-palette-refs": "node scripts/generate-matcha-palette-refs.mjs","check:matcha-palette-refs": "node scripts/generate-matcha-palette-refs.mjs --check",+ "generate:butter-palette-refs": "node scripts/generate-butter-palette-refs.mjs",+ "check:butter-palette-refs": "node scripts/generate-butter-palette-refs.mjs --check","dev": "pnpm -F @astryxdesign/storybook dev","test": "vitest run","test:watch": "vitest",@@ -22,7 +24,7 @@"test:a11y-contract": "playwright test --config playwright.config.ts --project chromium","test:docsite-browser": "playwright test --config apps/docsite/playwright.config.ts","check:package-boundaries": "node scripts/check-package-boundaries.js",- "check:repo": "pnpm check:visual-owner && pnpm check:sync && pnpm check:neutral-palette-refs && pnpm check:stone-palette-refs && pnpm check:gothic-palette-refs && pnpm check:matcha-palette-refs && pnpm check:data-tokens && pnpm check:token-docs && pnpm check:knowledge && pnpm check:package-boundaries && pnpm check:changesets && pnpm check:demo-media && pnpm check:executable-bits && pnpm check:cli-structure && pnpm check:use-client && pnpm check:portable-scripts && pnpm check:i18n-runtime && pnpm check:i18n-catalog && pnpm check:cldr-weekdays && pnpm check:fixtures && pnpm check:setup-contract",+ "check:repo": "pnpm check:visual-owner && pnpm check:sync && pnpm check:neutral-palette-refs && pnpm check:stone-palette-refs && pnpm check:gothic-palette-refs && pnpm check:matcha-palette-refs && pnpm check:butter-palette-refs && pnpm check:data-tokens && pnpm check:token-docs && pnpm check:knowledge && pnpm check:package-boundaries && pnpm check:changesets && pnpm check:demo-media && pnpm check:executable-bits && pnpm check:cli-structure && pnpm check:use-client && pnpm check:portable-scripts && pnpm check:i18n-runtime && pnpm check:i18n-catalog && pnpm check:cldr-weekdays && pnpm check:fixtures && pnpm check:setup-contract","check:visual-owner": "node scripts/check-visual-workflow-owner.mjs","check:fixtures": "node internal/vibe-tests/scripts/fixture-suite.mjs verify","generate:cldr-weekdays": "node scripts/generate-cldr-weekdays.mjs",diff --git a/packages/cli/assets/templates/themes/butter/butterPaletteRefs.generated.ts b/packages/cli/assets/templates/themes/butter/butterPaletteRefs.generated.tsnew file mode 100644index 0000000000..df32f360ca--- /dev/null+++ b/packages/cli/assets/templates/themes/butter/butterPaletteRefs.generated.ts@@ -0,0 +1,54 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++// Generated from the committed full palette for the stops used by Butter's+// theme source. Regenerate with `pnpm generate:butter-palette-refs`.+// Keep the complete palette available for authoring and audits without+// making consumers pay for unused palette stops.+// prettier-ignore+export const butterPaletteRefs = {+ purple: {+ light: {25: '#52237b', 80: '#ddb9f6', 90: '#f2daff'},+ dark: {25: '#52237b', 80: '#ddb9f6', 90: '#f2daff'},+ },+ green: {+ light: {25: '#004a05', 70: '#7bbf7a', 80: '#a2d7a0', 85: '#b6e3b4', 90: '#caeec8'},+ dark: {15: '#013004', 20: '#063c0a', 70: '#83bc82', 80: '#a8d4a6', 90: '#cdedcc'},+ },+ neutral: {+ light: {0: '#000000', 15: '#1d1c11', 30: '#4a4732', 45: '#605f52', 55: '#79786a', 70: '#adac9e', 75: '#c7c4b2', 80: '#d6d3b8', 85: '#e5e3d4', 90: '#f3f2e2', 95: '#fdfbe4', 100: '#ffffff'},+ dark: {0: '#000000', 5: '#131107', 10: '#261a13', 15: '#2e2117', 20: '#3a2a1f', 30: '#4a4732', 35: '#49473b', 40: '#725538', 45: '#605f52', 60: '#939184', 70: '#adac9e', 80: '#d6d3b8', 85: '#f0edd4', 90: '#f3f2e2', 95: '#fdfbe4', 100: '#ffffff'},+ },+ orange: {+ light: {25: '#622e00', 80: '#f2bd81', 90: '#ffdcb6'},+ dark: {25: '#622e00', 80: '#f2bd81', 90: '#ffdcb6'},+ },+ blue: {+ light: {25: '#203a6c', 80: '#bdc5eb', 90: '#dbe1ff'},+ dark: {25: '#203a6c', 80: '#bdc5eb', 90: '#dbe1ff'},+ },+ red: {+ light: {10: '#3b0200', 25: '#6f1400', 30: '#821b00', 60: '#e56241', 80: '#ffb09b', 90: '#ffd9cf', 95: '#ffece7'},+ dark: {15: '#4c0700', 25: '#6f1400', 80: '#ffb09b', 85: '#ffc5b5', 90: '#ffd9cf'},+ },+ yellow: {+ light: {25: '#443c00', 30: '#514700', 70: '#bfae35', 80: '#dfcf5b', 85: '#f0df72', 90: '#fdee8c', 95: '#fff7c0'},+ dark: {15: '#2c2600', 25: '#443c00', 70: '#bcae4e', 75: '#cdbe59', 85: '#eedf75', 90: '#fdee8c'},+ },+ teal: {+ light: {25: '#00482d', 80: '#94d3bb', 90: '#b0f0d7'},+ dark: {25: '#00482d', 80: '#94d3bb', 90: '#b0f0d7'},+ },+ accent: {+ light: {35: '#194ce8', 40: '#225bff', 55: '#4d82ff'},+ },+ cyan: {+ light: {25: '#004649', 80: '#8dd2d3', 90: '#a9eff0'},+ dark: {25: '#004649', 80: '#8dd2d3', 90: '#a9eff0'},+ },+ pink: {+ light: {25: '#6c0a68', 80: '#f0b3e8', 90: '#ffd5fb'},+ dark: {25: '#6c0a68', 80: '#f0b3e8', 90: '#ffd5fb'},+ },+} as const;++export default butterPaletteRefs;diff --git a/packages/cli/assets/templates/themes/butter/butterPalettes.generated.receipt.json b/packages/cli/assets/templates/themes/butter/butterPalettes.generated.receipt.jsonnew file mode 100644index 0000000000..16221047c6--- /dev/null+++ b/packages/cli/assets/templates/themes/butter/butterPalettes.generated.receipt.json@@ -0,0 +1,1499 @@+{+ "schemaVersion": 1,+ "recipe": "astryx-oklch-v1",+ "generatorVersion": "palette-generator-v1",+ "candidateFormatVersion": "palette-typescript-v1",+ "candidateSha256": "051a6b421e16af49a4d8b9c63979d393925caa8b6f6a79bf4288199768789c97",+ "preview": {+ "version": "palette-preview-v1",+ "sha256": "bc0e1c3dc37830ae9124485a63dd510b7e08def0ebc5b235f50cba3ed2c1c618"+ },+ "request": {+ "recipe": "astryx-oklch-v1",+ "vibrancy": 48,+ "neutralProfile": "custom",+ "modeStrategy": "light-and-dark",+ "stops": [+ 0,+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "families": [+ {+ "id": "neutral",+ "name": "Butter Neutral",+ "seed": "#79786a",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#131107",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#261a13",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#2e2117",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3a2a1f",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 35,+ "color": "#49473b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#939184",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 85,+ "color": "#f0edd4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 15,+ "color": "#1d1c11",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c7c4b2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#e5e3d4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "accent",+ "name": "Brand Blue",+ "seed": "#225bff",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Blue",+ "seed": "#5681ff",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Cyan",+ "seed": "#60cfd3",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "green",+ "name": "Green",+ "seed": "#5dce5f",+ "kind": "chromatic",+ "anchors": []+ },+ {+ "id": "orange",+ "name": "Orange",+ "seed": "#ffa347",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Pink",+ "seed": "#f680e8",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Purple",+ "seed": "#b780f6",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red",+ "seed": "#ff7553",+ "kind": "chromatic",+ "anchors": []+ },+ {+ "id": "teal",+ "name": "Teal",+ "seed": "#6cd9a8",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Butter Yellow",+ "seed": "#fdee8c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ }+ ]+ }+ ]+ },+ "diagnostics": {+ "families": {+ "neutral": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.5786304474438384,+ "maximumAdjacentDeltaE": 16.78081513889322,+ "maximumHueDrift": 37.73113036617252,+ "hueIdentityRisk": "yellow-to-brown",+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 15,+ "color": "#1d1c11",+ "policy": "exact",+ "generatedColor": "#1d1c11",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact",+ "generatedColor": "#4a4732",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#725538",+ "policy": "exact",+ "generatedColor": "#725538",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact",+ "generatedColor": "#605f52",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact",+ "generatedColor": "#79786a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact",+ "generatedColor": "#adac9e",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c7c4b2",+ "policy": "exact",+ "generatedColor": "#c7c4b2",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact",+ "generatedColor": "#d6d3b8",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#e5e3d4",+ "policy": "exact",+ "generatedColor": "#e5e3d4",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact",+ "generatedColor": "#f3f2e2",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact",+ "generatedColor": "#fdfbe4",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.3958368714337572,+ "maximumAdjacentDeltaE": 17.772771688672155,+ "maximumHueDrift": 55.44280731693226,+ "hueIdentityRisk": "yellow-to-brown",+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#131107",+ "policy": "exact",+ "generatedColor": "#131107",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#261a13",+ "policy": "exact",+ "generatedColor": "#261a13",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#2e2117",+ "policy": "exact",+ "generatedColor": "#2e2117",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3a2a1f",+ "policy": "exact",+ "generatedColor": "#3a2a1f",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact",+ "generatedColor": "#4a4732",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 35,+ "color": "#49473b",+ "policy": "exact",+ "generatedColor": "#49473b",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#725538",+ "policy": "exact",+ "generatedColor": "#725538",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact",+ "generatedColor": "#605f52",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact",+ "generatedColor": "#79786a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#939184",+ "policy": "exact",+ "generatedColor": "#939184",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact",+ "generatedColor": "#adac9e",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact",+ "generatedColor": "#d6d3b8",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 85,+ "color": "#f0edd4",+ "policy": "exact",+ "generatedColor": "#f0edd4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact",+ "generatedColor": "#f3f2e2",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact",+ "generatedColor": "#fdfbe4",+ "deltaE": 0+ }+ ]+ }+ },+ "accent": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.828164326468219,+ "maximumAdjacentDeltaE": 20.37894912303333,+ "maximumHueDrift": 0.4951462912753186,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact",+ "generatedColor": "#225bff",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.6446742601015836,+ "maximumAdjacentDeltaE": 19.655014034387623,+ "maximumHueDrift": 0.5099361206356434,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact",+ "generatedColor": "#225bff",+ "deltaE": 0+ }+ ]+ }+ },+ "blue": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.174676459917484,+ "maximumAdjacentDeltaE": 19.112238484906783,+ "maximumHueDrift": 10.418361367634134,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact",+ "generatedColor": "#203a6c",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact",+ "generatedColor": "#bdc5eb",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact",+ "generatedColor": "#dbe1ff",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.031479902710204,+ "maximumAdjacentDeltaE": 18.737551010757482,+ "maximumHueDrift": 10.018589080604215,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact",+ "generatedColor": "#203a6c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact",+ "generatedColor": "#bdc5eb",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact",+ "generatedColor": "#dbe1ff",+ "deltaE": 0+ }+ ]+ }+ },+ "cyan": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.9174836311686585,+ "maximumAdjacentDeltaE": 18.082418660631305,+ "maximumHueDrift": 4.173686409412653,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#004649",+ "policy": "exact",+ "generatedColor": "#004649",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact",+ "generatedColor": "#8dd2d3",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact",+ "generatedColor": "#a9eff0",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.9174836311686585,+ "maximumAdjacentDeltaE": 18.082418660631305,+ "maximumHueDrift": 4.173686409412653,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#004649",+ "policy": "exact",+ "generatedColor": "#004649",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact",+ "generatedColor": "#8dd2d3",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact",+ "generatedColor": "#a9eff0",+ "deltaE": 0+ }+ ]+ }+ },+ "green": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.245396699608261,+ "maximumAdjacentDeltaE": 19.13154978272725,+ "maximumHueDrift": 1.2209615025973335,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 100+ ],+ "anchors": []+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.03416947855013,+ "maximumAdjacentDeltaE": 18.67952255256301,+ "maximumHueDrift": 0.7145037900080524,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 100+ ],+ "anchors": []+ }+ },+ "orange": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.050184135588038,+ "maximumAdjacentDeltaE": 18.95216660095764,+ "maximumHueDrift": 24.64704679322574,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact",+ "generatedColor": "#622e00",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact",+ "generatedColor": "#f2bd81",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact",+ "generatedColor": "#ffdcb6",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.058268156664758,+ "maximumAdjacentDeltaE": 18.850527798718115,+ "maximumHueDrift": 22.43706415021734,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact",+ "generatedColor": "#622e00",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact",+ "generatedColor": "#f2bd81",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact",+ "generatedColor": "#ffdcb6",+ "deltaE": 0+ }+ ]+ }+ },+ "pink": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.0746011417386505,+ "maximumAdjacentDeltaE": 19.562138886240948,+ "maximumHueDrift": 2.8689815936833156,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact",+ "generatedColor": "#6c0a68",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact",+ "generatedColor": "#f0b3e8",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact",+ "generatedColor": "#ffd5fb",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.074388606246993,+ "maximumAdjacentDeltaE": 19.385870095105123,+ "maximumHueDrift": 2.6308143285550614,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact",+ "generatedColor": "#6c0a68",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact",+ "generatedColor": "#f0b3e8",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact",+ "generatedColor": "#ffd5fb",+ "deltaE": 0+ }+ ]+ }+ },+ "purple": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.101494918466824,+ "maximumAdjacentDeltaE": 19.541730060540445,+ "maximumHueDrift": 10.295127517158221,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact",+ "generatedColor": "#52237b",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact",+ "generatedColor": "#ddb9f6",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact",+ "generatedColor": "#f2daff",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.118863819762729,+ "maximumAdjacentDeltaE": 19.17416175430863,+ "maximumHueDrift": 10.171095818990466,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact",+ "generatedColor": "#52237b",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact",+ "generatedColor": "#ddb9f6",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact",+ "generatedColor": "#f2daff",+ "deltaE": 0+ }+ ]+ }+ },+ "red": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.221213833696644,+ "maximumAdjacentDeltaE": 19.621884706160397,+ "maximumHueDrift": 5.87959867281387,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": []+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.1453694025330945,+ "maximumAdjacentDeltaE": 19.346124422908343,+ "maximumHueDrift": 5.781447178539224,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 10,+ 15,+ 20,+ 25,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": []+ }+ },+ "teal": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.974502550535286,+ "maximumAdjacentDeltaE": 18.512034326959434,+ "maximumHueDrift": 6.723119120660385,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact",+ "generatedColor": "#00482d",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact",+ "generatedColor": "#94d3bb",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact",+ "generatedColor": "#b0f0d7",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.9132256827184437,+ "maximumAdjacentDeltaE": 18.512034326959434,+ "maximumHueDrift": 6.958028377309802,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 10,+ 15,+ 20,+ 25,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact",+ "generatedColor": "#00482d",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact",+ "generatedColor": "#94d3bb",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact",+ "generatedColor": "#b0f0d7",+ "deltaE": 0+ }+ ]+ }+ },+ "yellow": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.161245526611894,+ "maximumAdjacentDeltaE": 18.232815189537895,+ "maximumHueDrift": 4.146174782493631,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact",+ "generatedColor": "#fdee8c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.180532434598464,+ "maximumAdjacentDeltaE": 18.232815189537895,+ "maximumHueDrift": 4.146174782493631,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact",+ "generatedColor": "#fdee8c",+ "deltaE": 0+ }+ ]+ }+ }+ },+ "coordination": [+ {+ "mode": "light",+ "stop": 50,+ "closestFamilies": [+ "Green",+ "Teal"+ ],+ "minimumFamilyDeltaE": 5.229525172539283,+ "strongestFamily": "Brand Blue",+ "weakestFamily": "Cyan",+ "chromaRatio": 2.174472121772574+ },+ {+ "mode": "dark",+ "stop": 50,+ "closestFamilies": [+ "Green",+ "Teal"+ ],+ "minimumFamilyDeltaE": 4.509449398410727,+ "strongestFamily": "Brand Blue",+ "weakestFamily": "Blue",+ "chromaRatio": 2.1862259709811025+ }+ ]+ }+}diff --git a/packages/cli/assets/templates/themes/butter/butterPalettes.generated.ts b/packages/cli/assets/templates/themes/butter/butterPalettes.generated.tsnew file mode 100644index 0000000000..e1c1158af9--- /dev/null+++ b/packages/cli/assets/templates/themes/butter/butterPalettes.generated.ts@@ -0,0 +1,550 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++// Generated by astryx-oklch-v1. Review before committing.+export const black = '#000000' as const;+export const white = '#ffffff' as const;++// prettier-ignore+export const palette = {+ "neutral": {+ "name": "Butter Neutral",+ "light": {+ "0": "#000000",+ "5": "#100f09",+ "10": "#15150c",+ "15": "#1d1c11",+ "20": "#2a291a",+ "25": "#3b3927",+ "30": "#4a4732",+ "35": "#5c5034",+ "40": "#725538",+ "45": "#605f52",+ "50": "#6d6b5d",+ "55": "#79786a",+ "60": "#89877a",+ "65": "#9c9b8d",+ "70": "#adac9e",+ "75": "#c7c4b2",+ "80": "#d6d3b8",+ "85": "#e5e3d4",+ "90": "#f3f2e2",+ "95": "#fdfbe4",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#131107",+ "10": "#261a13",+ "15": "#2e2117",+ "20": "#3a2a1f",+ "25": "#433827",+ "30": "#4a4732",+ "35": "#49473b",+ "40": "#725538",+ "45": "#605f52",+ "50": "#6c6c5e",+ "55": "#79786a",+ "60": "#939184",+ "65": "#9f9e91",+ "70": "#adac9e",+ "75": "#c2c0aa",+ "80": "#d6d3b8",+ "85": "#f0edd4",+ "90": "#f3f2e2",+ "95": "#fdfbe4",+ "100": "#ffffff"+ }+ },+ "accent": {+ "name": "Brand Blue",+ "light": {+ "0": "#000000",+ "5": "#00073c",+ "10": "#010e55",+ "15": "#02166b",+ "20": "#052185",+ "25": "#0a2ea5",+ "30": "#103cc8",+ "35": "#194ce8",+ "40": "#225bff",+ "45": "#356cff",+ "50": "#4278ff",+ "55": "#4d82ff",+ "60": "#5a8cff",+ "65": "#6c9aff",+ "70": "#81a9ff",+ "75": "#96b8ff",+ "80": "#abc6ff",+ "85": "#c0d5ff",+ "90": "#d5e3ff",+ "95": "#eaf1ff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#010a36",+ "10": "#03134d",+ "15": "#051c61",+ "20": "#0a267a",+ "25": "#0e329d",+ "30": "#133fc3",+ "35": "#194ce6",+ "40": "#225bff",+ "45": "#336bff",+ "50": "#4178ff",+ "55": "#4d81ff",+ "60": "#5b8cfc",+ "65": "#6c9aff",+ "70": "#81a9ff",+ "75": "#96b8ff",+ "80": "#abc6ff",+ "85": "#c0d5ff",+ "90": "#d5e3ff",+ "95": "#eaf1ff",+ "100": "#ffffff"+ }+ },+ "blue": {+ "name": "Blue",+ "light": {+ "0": "#000000",+ "5": "#020e2f",+ "10": "#051941",+ "15": "#0d234f",+ "20": "#182f5d",+ "25": "#203a6c",+ "30": "#2c457d",+ "35": "#37508c",+ "40": "#435c9b",+ "45": "#5068a9",+ "50": "#5d75b7",+ "55": "#6b81c4",+ "60": "#798ed1",+ "65": "#899cdc",+ "70": "#98a9e6",+ "75": "#aab6ec",+ "80": "#bdc5eb",+ "85": "#ccd3f5",+ "90": "#dbe1ff",+ "95": "#edf0ff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#030f2b",+ "10": "#081a3e",+ "15": "#0f234d",+ "20": "#172f5c",+ "25": "#203a6c",+ "30": "#2b457c",+ "35": "#37508a",+ "40": "#435c98",+ "45": "#5168a4",+ "50": "#5e76b1",+ "55": "#6d82bc",+ "60": "#7c8fc8",+ "65": "#8c9cd2",+ "70": "#9caadc",+ "75": "#abb7e6",+ "80": "#bdc5eb",+ "85": "#ccd3f5",+ "90": "#dbe1ff",+ "95": "#edf0ff",+ "100": "#ffffff"+ }+ },+ "cyan": {+ "name": "Cyan",+ "light": {+ "0": "#000000",+ "5": "#001517",+ "10": "#002123",+ "15": "#002e30",+ "20": "#00393c",+ "25": "#004649",+ "30": "#005356",+ "35": "#006063",+ "40": "#006c70",+ "45": "#007a7e",+ "50": "#00878b",+ "55": "#00959a",+ "60": "#01a3a7",+ "65": "#33b0b3",+ "70": "#54bbbd",+ "75": "#71c6c8",+ "80": "#8dd2d3",+ "85": "#9be1e1",+ "90": "#a9eff0",+ "95": "#ccfafb",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001517",+ "10": "#002123",+ "15": "#002e30",+ "20": "#00393c",+ "25": "#004649",+ "30": "#005356",+ "35": "#006063",+ "40": "#006c70",+ "45": "#007a7e",+ "50": "#00888c",+ "55": "#119599",+ "60": "#2aa2a5",+ "65": "#41aeb1",+ "70": "#5ababc",+ "75": "#74c6c7",+ "80": "#8dd2d3",+ "85": "#9ce0e1",+ "90": "#a9eff0",+ "95": "#cef9fa",+ "100": "#ffffff"+ }+ },+ "green": {+ "name": "Green",+ "light": {+ "0": "#000000",+ "5": "#001800",+ "10": "#002400",+ "15": "#003001",+ "20": "#003d03",+ "25": "#004a05",+ "30": "#04570e",+ "35": "#136419",+ "40": "#217125",+ "45": "#2e7e31",+ "50": "#3c8b3d",+ "55": "#4a984a",+ "60": "#58a658",+ "65": "#69b368",+ "70": "#7bbf7a",+ "75": "#8ecb8d",+ "80": "#a2d7a0",+ "85": "#b6e3b4",+ "90": "#caeec8",+ "95": "#ddfadc",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001701",+ "10": "#002401",+ "15": "#013004",+ "20": "#063c0a",+ "25": "#0f4812",+ "30": "#19551c",+ "35": "#246226",+ "40": "#2f6e30",+ "45": "#3b7b3c",+ "50": "#488948",+ "55": "#559655",+ "60": "#63a362",+ "65": "#72b071",+ "70": "#83bc82",+ "75": "#96c894",+ "80": "#a8d4a6",+ "85": "#bbe1b9",+ "90": "#cdedcc",+ "95": "#e0f9df",+ "100": "#ffffff"+ }+ },+ "orange": {+ "name": "Orange",+ "light": {+ "0": "#000000",+ "5": "#260500",+ "10": "#351000",+ "15": "#431a00",+ "20": "#522500",+ "25": "#622e00",+ "30": "#723901",+ "35": "#804404",+ "40": "#8f4f0b",+ "45": "#9e5a13",+ "50": "#ab681b",+ "55": "#ba7423",+ "60": "#c88031",+ "65": "#d48f45",+ "70": "#de9e58",+ "75": "#e8ad6c",+ "80": "#f2bd81",+ "85": "#fbcb96",+ "90": "#ffdcb6",+ "95": "#ffeedb",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#250600",+ "10": "#351000",+ "15": "#431a00",+ "20": "#522500",+ "25": "#622e00",+ "30": "#723900",+ "35": "#814301",+ "40": "#904e02",+ "45": "#9e5a0f",+ "50": "#aa681a",+ "55": "#b7762b",+ "60": "#c3833b",+ "65": "#d0904b",+ "70": "#dc9f5c",+ "75": "#e7ad6e",+ "80": "#f2bd81",+ "85": "#fbcc98",+ "90": "#ffdcb6",+ "95": "#ffeedb",+ "100": "#ffffff"+ }+ },+ "pink": {+ "name": "Pink",+ "light": {+ "0": "#000000",+ "5": "#230021",+ "10": "#360034",+ "15": "#490047",+ "20": "#5b0058",+ "25": "#6c0a68",+ "30": "#7a1976",+ "35": "#892783",+ "40": "#963690",+ "45": "#a3459b",+ "50": "#ae54a7",+ "55": "#b963b2",+ "60": "#c573bc",+ "65": "#d083c8",+ "70": "#da92d2",+ "75": "#e5a3dd",+ "80": "#f0b3e8",+ "85": "#fac3f3",+ "90": "#ffd5fb",+ "95": "#ffeafd",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#22031f",+ "10": "#350332",+ "15": "#490045",+ "20": "#5c0158",+ "25": "#6c0a68",+ "30": "#7a1975",+ "35": "#882882",+ "40": "#95378e",+ "45": "#a2469b",+ "50": "#ad55a5",+ "55": "#b964b1",+ "60": "#c474bc",+ "65": "#cf83c6",+ "70": "#d993d2",+ "75": "#e4a3dc",+ "80": "#f0b3e8",+ "85": "#f7c4f2",+ "90": "#ffd5fb",+ "95": "#ffebfd",+ "100": "#ffffff"+ }+ },+ "purple": {+ "name": "Purple",+ "light": {+ "0": "#000000",+ "5": "#1a052b",+ "10": "#280a40",+ "15": "#361156",+ "20": "#451969",+ "25": "#52237b",+ "30": "#5f2f8a",+ "35": "#6c3a97",+ "40": "#7946a4",+ "45": "#8554b0",+ "50": "#9261bc",+ "55": "#9e6fc6",+ "60": "#aa7dd0",+ "65": "#b78bd9",+ "70": "#c49be3",+ "75": "#d0aaed",+ "80": "#ddb9f6",+ "85": "#eac8fd",+ "90": "#f2daff",+ "95": "#f8ecff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#180729",+ "10": "#270c3f",+ "15": "#351154",+ "20": "#441969",+ "25": "#52237b",+ "30": "#5f2e8a",+ "35": "#6c3a98",+ "40": "#7847a3",+ "45": "#8554b0",+ "50": "#9162bb",+ "55": "#9e70c5",+ "60": "#aa7ecf",+ "65": "#b68cd8",+ "70": "#c39ce3",+ "75": "#d0aaec",+ "80": "#ddb9f6",+ "85": "#e8c9fc",+ "90": "#f2daff",+ "95": "#f8ecff",+ "100": "#ffffff"+ }+ },+ "red": {+ "name": "Red",+ "light": {+ "0": "#000000",+ "5": "#2b0000",+ "10": "#3b0200",+ "15": "#4c0700",+ "20": "#5d0e00",+ "25": "#6f1400",+ "30": "#821b00",+ "35": "#952100",+ "40": "#a92800",+ "45": "#b93611",+ "50": "#c84422",+ "55": "#d75332",+ "60": "#e56241",+ "65": "#f37151",+ "70": "#ff8162",+ "75": "#ff9a80",+ "80": "#ffb09b",+ "85": "#ffc5b5",+ "90": "#ffd9cf",+ "95": "#ffece7",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#2a0000",+ "10": "#3b0200",+ "15": "#4c0700",+ "20": "#5d0e00",+ "25": "#6f1400",+ "30": "#801f03",+ "35": "#902a0f",+ "40": "#a0361b",+ "45": "#af4328",+ "50": "#be5035",+ "55": "#cc5d42",+ "60": "#da6c50",+ "65": "#e87a5f",+ "70": "#f4896f",+ "75": "#ff9a80",+ "80": "#ffb09b",+ "85": "#ffc5b5",+ "90": "#ffd9cf",+ "95": "#ffece7",+ "100": "#ffffff"+ }+ },+ "teal": {+ "name": "Teal",+ "light": {+ "0": "#000000",+ "5": "#001709",+ "10": "#002312",+ "15": "#002f1c",+ "20": "#003b24",+ "25": "#00482d",+ "30": "#005538",+ "35": "#006342",+ "40": "#00704c",+ "45": "#0c7d59",+ "50": "#208a65",+ "55": "#319672",+ "60": "#42a37f",+ "65": "#54b08e",+ "70": "#68bc9c",+ "75": "#7ec8ac",+ "80": "#94d3bb",+ "85": "#a2e1c9",+ "90": "#b0f0d7",+ "95": "#cffbe9",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001709",+ "10": "#002312",+ "15": "#002f1c",+ "20": "#003b24",+ "25": "#00482d",+ "30": "#045538",+ "35": "#106144",+ "40": "#1b6e4f",+ "45": "#277b5b",+ "50": "#328767",+ "55": "#3d9474",+ "60": "#4ba282",+ "65": "#5aae8f",+ "70": "#6cbb9e",+ "75": "#80c7ac",+ "80": "#94d3bb",+ "85": "#a2e1c9",+ "90": "#b0f0d7",+ "95": "#d1fbea",+ "100": "#ffffff"+ }+ },+ "yellow": {+ "name": "Butter Yellow",+ "light": {+ "0": "#000000",+ "5": "#161100",+ "10": "#211c00",+ "15": "#2c2600",+ "20": "#383100",+ "25": "#443c00",+ "30": "#514700",+ "35": "#5e5300",+ "40": "#6b5f00",+ "45": "#796b00",+ "50": "#877800",+ "55": "#958500",+ "60": "#a49200",+ "65": "#b19f1a",+ "70": "#bfae35",+ "75": "#cfbe48",+ "80": "#dfcf5b",+ "85": "#f0df72",+ "90": "#fdee8c",+ "95": "#fff7c0",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#161100",+ "10": "#211c00",+ "15": "#2c2600",+ "20": "#383100",+ "25": "#443c00",+ "30": "#514700",+ "35": "#5e5300",+ "40": "#6b5f00",+ "45": "#796b00",+ "50": "#877800",+ "55": "#958510",+ "60": "#a19229",+ "65": "#aea03e",+ "70": "#bcae4e",+ "75": "#cdbe59",+ "80": "#dfce65",+ "85": "#eedf75",+ "90": "#fdee8c",+ "95": "#fff7c2",+ "100": "#ffffff"+ }+ }+} as const;++export default palette;diff --git a/packages/cli/assets/templates/themes/butter/butterTheme.ts b/packages/cli/assets/templates/themes/butter/butterTheme.tsindex 1d91ea5f54..6019ed7469 100644--- a/packages/cli/assets/templates/themes/butter/butterTheme.ts+++ b/packages/cli/assets/templates/themes/butter/butterTheme.ts@@ -6,40 +6,50 @@* Warm, golden buttery theme with blue accents.* Sarina for display, Outfit for headings and body.*- * Source palette (per design):- * Accent #225BFF Gray #868B99 Red #FF7553- * Orange #FFA347 Yellow #fdee8c Green #5DCE5F- * Cyan #60CFD3 Teal #6CD9A8 Blue #5681FF- * Purple #B780F6 Pink #F680E8 Error #FF5947- * Warning #F8C726 Success #91D143- *- * All tonal ramps derived in CIELab (matches the algorithm used by- * ThemePalettePreview so card / badge / banner / strip render the- * same values). Regen via scripts/butter-palette-gen.mjs if sources- * change.+ * All colors resolve through named stops from Butter's reviewed palette.+ * The signature blue and butter yellow remain exact anchors.*/import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';import {butterIconRegistry} from './icons';--/** Butter syntax palette — T25 / T80 of each color's ramp. */+import {butterPaletteRefs} from './butterPaletteRefs.generated';++const {+ accent,+ blue,+ cyan,+ green,+ neutral,+ orange,+ pink,+ purple,+ red,+ teal,+ yellow,+} = butterPaletteRefs;++const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;+const lightDark = (light: string, dark: string): string =>+ `light-dark(${light}, ${dark})`;++/** Butter syntax colors resolved through reviewed palette stops. */const butterSyntax = defineSyntaxTheme({name: 'astryx-butter',tokens: {- keyword: ['#52237b', '#ddb9f6'], // Purple- string: ['#004800', '#a5d29d'], // Green- comment: ['#605f52', '#adac9e'],- number: ['#622e00', '#f2bd81'], // Orange- function: ['#203a6c', '#bdc5eb'], // Blue- type: ['#52237b', '#ddb9f6'], // Purple- variable: ['#605f52', '#adac9e'],- operator: ['#605f52', '#adac9e'],- constant: ['#622e00', '#f2bd81'],- tag: ['#6d211c', '#f4b8ae'], // Red- attribute: ['#413e00', '#d6c957'], // Yellow- property: ['#00482d', '#94d3bb'], // Teal- punctuation: ['#605f52', '#adac9e'],- background: ['#FDFBE4', '#131107'],+ keyword: [purple.light[25], purple.dark[80]], // Purple+ string: [green.light[25], green.dark[80]], // Green+ comment: [neutral.light[45], neutral.dark[70]],+ number: [orange.light[25], orange.dark[80]], // Orange+ function: [blue.light[25], blue.dark[80]], // Blue+ type: [purple.light[25], purple.dark[80]], // Purple+ variable: [neutral.light[45], neutral.dark[70]],+ operator: [neutral.light[45], neutral.dark[70]],+ constant: [orange.light[25], orange.dark[80]],+ tag: [red.light[25], red.dark[80]], // Red+ attribute: [yellow.light[25], yellow.dark[70]], // Yellow+ property: [teal.light[25], teal.dark[80]], // Teal+ punctuation: [neutral.light[45], neutral.dark[70]],+ background: [neutral.light[95], neutral.dark[5]],},});@@ -54,10 +64,13 @@ const SECONDARY_BUTTON = {backgroundColor: 'transparent',borderWidth: '1.5px',borderStyle: 'solid',- borderColor: 'light-dark(#225BFF, #FDEE8C)',- color: 'light-dark(#225BFF, #FDEE8C)',+ borderColor: lightDark(accent.light[40], yellow.dark[90]),+ color: lightDark(accent.light[40], yellow.dark[90]),':hover': {- backgroundColor: 'light-dark(#225BFF14, #FDEE8C14)',+ backgroundColor: lightDark(+ withAlpha(accent.light[40], '14'),+ withAlpha(yellow.dark[90], '14'),+ ),},} as const;@@ -134,58 +147,85 @@ export const butterTheme = defineTheme({tokens: {// =========================================================================- // Core semantic — accent is the exact brand #225BFF+ // Core semantic — accent uses the exact signature brand stop// =========================================================================- '--color-accent': ['#225BFF', '#FDEE8C'],- '--color-accent-muted': ['#225BFF33', '#FDEE8C40'],- '--color-neutral': ['#1d1c110F', '#f3f2e21A'],- '--color-background-surface': ['#FFFFFF', '#2E2117'],- '--color-background-body': ['#FDFBE4', '#261A13'],- '--color-overlay': ['#1d1c1180', '#261A13cc'],- '--color-overlay-hover': ['#1d1c110D', '#f3f2e20D'],- '--color-overlay-pressed': ['#1d1c111A', '#f3f2e21A'],- '--color-background-muted': ['#f3f2e2', '#3A2A1F'],+ '--color-accent': [accent.light[40], yellow.dark[90]],+ '--color-accent-muted': [+ withAlpha(accent.light[40], '33'),+ withAlpha(yellow.dark[90], '40'),+ ],+ '--color-neutral': [+ withAlpha(neutral.light[15], '0f'),+ withAlpha(neutral.dark[90], '1a'),+ ],+ '--color-background-surface': [neutral.light[100], neutral.dark[15]],+ '--color-background-body': [neutral.light[95], neutral.dark[10]],+ '--color-overlay': [+ withAlpha(neutral.light[15], '80'),+ withAlpha(neutral.dark[10], 'cc'),+ ],+ '--color-overlay-hover': [+ withAlpha(neutral.light[15], '0d'),+ withAlpha(neutral.dark[90], '0d'),+ ],+ '--color-overlay-pressed': [+ withAlpha(neutral.light[15], '1a'),+ withAlpha(neutral.dark[90], '1a'),+ ],+ '--color-background-muted': [neutral.light[90], neutral.dark[20]],// Text — warm neutral- '--color-text-primary': ['#1d1c11', '#f3f2e2'],- '--color-text-secondary': ['#605f52', '#adac9e'],- '--color-text-disabled': ['#adac9e', '#605f52'],- '--color-text-accent': ['#225BFF', '#FDEE8C'],- '--color-on-dark': '#ffffff',- '--color-on-light': '#1d1c11',- '--color-on-accent': ['#ffffff', '#1d1c11'],- // T95 of each ramp for use on the vivid semantic surfaces.- '--color-on-success': ['#ccff88', '#0b2e00'],- '--color-on-error': ['#ffe3de', '#600000'],- '--color-on-warning': ['#ffeec3', '#3b2200'],+ '--color-text-primary': [neutral.light[15], neutral.dark[90]],+ '--color-text-secondary': [neutral.light[45], neutral.dark[70]],+ '--color-text-disabled': [neutral.light[70], neutral.dark[45]],+ '--color-text-accent': [accent.light[40], yellow.dark[90]],+ '--color-on-dark': neutral.light[100],+ '--color-on-light': neutral.light[15],+ '--color-on-accent': [neutral.light[100], neutral.light[15]],+ // Light foregrounds used on vivid semantic surfaces.+ '--color-on-success': [green.light[85], green.dark[15]],+ '--color-on-error': [red.light[95], red.dark[15]],+ '--color-on-warning': [yellow.light[95], yellow.dark[15]],// Icon- '--color-icon-accent': ['#225BFF', '#FDEE8C'],- '--color-icon-primary': ['#1d1c11', '#f3f2e2'],- '--color-icon-secondary': ['#605f52', '#adac9e'],- '--color-icon-disabled': ['#adac9e', '#605f52'],+ '--color-icon-accent': [accent.light[40], yellow.dark[90]],+ '--color-icon-primary': [neutral.light[15], neutral.dark[90]],+ '--color-icon-secondary': [neutral.light[45], neutral.dark[70]],+ '--color-icon-disabled': [neutral.light[70], neutral.dark[45]],// Surface variants- '--color-background-card': ['#FFFFFF', '#3A2A1F'],- '--color-background-popover': ['#FFFFFF', '#3A2A1F'],- '--color-background-inverted': ['#1d1c11', '#FDFBE4'],-- // Status semantics — T25 light / T80 dark from each status palette.- '--color-error': ['#771210', '#ffb4a6'],- '--color-error-muted': ['#77121033', '#ffb4a640'],- '--color-warning': ['#543700', '#f7be00'],- '--color-warning-muted': ['#54370033', '#f7be0040'],- '--color-success': ['#004700', '#99d94b'],- '--color-success-muted': ['#00470033', '#99d94b40'],+ '--color-background-card': [neutral.light[100], neutral.dark[20]],+ '--color-background-popover': [neutral.light[100], neutral.dark[20]],+ '--color-background-inverted': [neutral.light[15], neutral.dark[95]],++ // Status semantics share the Red, Yellow, and Green families.+ '--color-error': [red.light[30], red.dark[85]],+ '--color-error-muted': [+ withAlpha(red.light[30], '33'),+ withAlpha(red.dark[85], '40'),+ ],+ '--color-warning': [yellow.light[30], yellow.dark[75]],+ '--color-warning-muted': [+ withAlpha(yellow.light[30], '33'),+ withAlpha(yellow.dark[75], '40'),+ ],+ '--color-success': [green.light[25], green.dark[70]],+ '--color-success-muted': [+ withAlpha(green.light[25], '33'),+ withAlpha(green.dark[70], '40'),+ ],// Border — softer taupe card outline (emphasized) in light mode.- '--color-border': ['#e5e3d4', '#f3f2e21A'],- '--color-border-emphasized': ['#C7C4B2', '#939184'],+ '--color-border': [neutral.light[85], withAlpha(neutral.dark[90], '1a')],+ '--color-border-emphasized': [neutral.light[75], neutral.dark[60]],// Effects- '--color-skeleton': ['#e5e3d4', '#49473b'],- '--color-shadow': ['#1d1c111A', '#0000004D'],- '--color-tint-hover': ['black', 'white'],+ '--color-skeleton': [neutral.light[85], neutral.dark[35]],+ '--color-shadow': [+ withAlpha(neutral.light[15], '1a'),+ withAlpha(neutral.dark[0], '4d'),+ ],+ '--color-tint-hover': [neutral.light[0], neutral.dark[100]],// Typography override'--text-supporting-size': '12px',@@ -197,69 +237,68 @@ export const butterTheme = defineTheme({'--size-element-lg': '48px',// =========================================================================- // Categorical — same values in light and dark mode (curated dark mode- // keeps the same pastel backgrounds + dark text as light mode).+ // Categorical — reviewed light and dark stops for each family.// =========================================================================// Blue- '--color-background-blue': ['#dbe1ff', '#dbe1ff'],- '--color-border-blue': ['#bdc5eb', '#bdc5eb'],- '--color-icon-blue': ['#203a6c', '#203a6c'],- '--color-text-blue': ['#203a6c', '#203a6c'],+ '--color-background-blue': [blue.light[90], blue.dark[90]],+ '--color-border-blue': [blue.light[80], blue.dark[80]],+ '--color-icon-blue': [blue.light[25], blue.dark[25]],+ '--color-text-blue': [blue.light[25], blue.dark[25]],// Cyan- '--color-background-cyan': ['#a9eff0', '#a9eff0'],- '--color-border-cyan': ['#8dd2d3', '#8dd2d3'],- '--color-icon-cyan': ['#004649', '#004649'],- '--color-text-cyan': ['#004649', '#004649'],+ '--color-background-cyan': [cyan.light[90], cyan.dark[90]],+ '--color-border-cyan': [cyan.light[80], cyan.dark[80]],+ '--color-icon-cyan': [cyan.light[25], cyan.dark[25]],+ '--color-text-cyan': [cyan.light[25], cyan.dark[25]],// Gray (uses the neutral palette)- '--color-background-gray': ['#f0edd4', '#f0edd4'],- '--color-border-gray': ['#d6d3b8', '#d6d3b8'],- '--color-icon-gray': ['#4a4732', '#4a4732'],- '--color-text-gray': ['#4a4732', '#4a4732'],+ '--color-background-gray': [neutral.dark[85], neutral.dark[85]],+ '--color-border-gray': [neutral.light[80], neutral.dark[80]],+ '--color-icon-gray': [neutral.light[30], neutral.dark[30]],+ '--color-text-gray': [neutral.light[30], neutral.dark[30]],// Green- '--color-background-green': ['#c1efb8', '#c1efb8'],- '--color-border-green': ['#a5d29d', '#a5d29d'],- '--color-icon-green': ['#004800', '#004800'],- '--color-text-green': ['#004800', '#004800'],+ '--color-background-green': [green.light[90], green.dark[90]],+ '--color-border-green': [green.light[80], green.dark[80]],+ '--color-icon-green': [green.light[25], green.dark[20]],+ '--color-text-green': [green.light[25], green.dark[20]],// Orange- '--color-background-orange': ['#ffdcb6', '#ffdcb6'],- '--color-border-orange': ['#f2bd81', '#f2bd81'],- '--color-icon-orange': ['#622e00', '#622e00'],- '--color-text-orange': ['#622e00', '#622e00'],+ '--color-background-orange': [orange.light[90], orange.dark[90]],+ '--color-border-orange': [orange.light[80], orange.dark[80]],+ '--color-icon-orange': [orange.light[25], orange.dark[25]],+ '--color-text-orange': [orange.light[25], orange.dark[25]],// Pink- '--color-background-pink': ['#ffd5fb', '#ffd5fb'],- '--color-border-pink': ['#f0b3e8', '#f0b3e8'],- '--color-icon-pink': ['#6c0a68', '#6c0a68'],- '--color-text-pink': ['#6c0a68', '#6c0a68'],+ '--color-background-pink': [pink.light[90], pink.dark[90]],+ '--color-border-pink': [pink.light[80], pink.dark[80]],+ '--color-icon-pink': [pink.light[25], pink.dark[25]],+ '--color-text-pink': [pink.light[25], pink.dark[25]],// Purple- '--color-background-purple': ['#f2daff', '#f2daff'],- '--color-border-purple': ['#ddb9f6', '#ddb9f6'],- '--color-icon-purple': ['#52237b', '#52237b'],- '--color-text-purple': ['#52237b', '#52237b'],+ '--color-background-purple': [purple.light[90], purple.dark[90]],+ '--color-border-purple': [purple.light[80], purple.dark[80]],+ '--color-icon-purple': [purple.light[25], purple.dark[25]],+ '--color-text-purple': [purple.light[25], purple.dark[25]],// Red- '--color-background-red': ['#ffdad3', '#ffdad3'],- '--color-border-red': ['#f4b8ae', '#f4b8ae'],- '--color-icon-red': ['#6d211c', '#6d211c'],- '--color-text-red': ['#6d211c', '#6d211c'],+ '--color-background-red': [red.light[90], red.dark[90]],+ '--color-border-red': [red.light[80], red.dark[80]],+ '--color-icon-red': [red.light[25], red.dark[25]],+ '--color-text-red': [red.light[25], red.dark[25]],// Teal- '--color-background-teal': ['#b0f0d7', '#b0f0d7'],- '--color-border-teal': ['#94d3bb', '#94d3bb'],- '--color-icon-teal': ['#00482d', '#00482d'],- '--color-text-teal': ['#00482d', '#00482d'],+ '--color-background-teal': [teal.light[90], teal.dark[90]],+ '--color-border-teal': [teal.light[80], teal.dark[80]],+ '--color-icon-teal': [teal.light[25], teal.dark[25]],+ '--color-text-teal': [teal.light[25], teal.dark[25]],// Yellow- '--color-background-yellow': ['#feee7b', '#feee7b'],- '--color-border-yellow': ['#d6c957', '#d6c957'],- '--color-icon-yellow': ['#413e00', '#413e00'],- '--color-text-yellow': ['#413e00', '#413e00'],+ '--color-background-yellow': [yellow.light[85], yellow.dark[85]],+ '--color-border-yellow': [yellow.light[70], yellow.dark[70]],+ '--color-icon-yellow': [yellow.light[25], yellow.dark[25]],+ '--color-text-yellow': [yellow.light[25], yellow.dark[25]],// =========================================================================// Radius@@ -279,14 +318,14 @@ export const butterTheme = defineTheme({// =========================================================================// Shadows — warm neutral tint// =========================================================================- '--shadow-low': '0 2px 4px #1d1c110D, 0 4px 8px #1d1c111A',- '--shadow-med': '0 2px 4px #1d1c110D, 0 4px 12px #1d1c111A',- '--shadow-high': '0 4px 6px #1d1c111A, 0 12px 24px #1d1c1126',- '--shadow-inset-hover': 'inset 0px 0px 0px 2px #79786a30',- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #79786a50',- '--shadow-inset-success': 'inset 0px 0px 0px 2px #00470030',- '--shadow-inset-warning': 'inset 0px 0px 0px 2px #54370030',- '--shadow-inset-error': 'inset 0px 0px 0px 2px #77121030',+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.light[15], '0d')}, 0 4px 8px ${withAlpha(neutral.light[15], '1a')}`,+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.light[15], '0d')}, 0 4px 12px ${withAlpha(neutral.light[15], '1a')}`,+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.light[15], '1a')}, 0 12px 24px ${withAlpha(neutral.light[15], '26')}`,+ '--shadow-inset-hover': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[55], '30')}`,+ '--shadow-inset-selected': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[55], '50')}`,+ '--shadow-inset-success': `inset 0px 0px 0px 2px ${withAlpha(green.light[25], '30')}`,+ '--shadow-inset-warning': `inset 0px 0px 0px 2px ${withAlpha(yellow.light[30], '30')}`,+ '--shadow-inset-error': `inset 0px 0px 0px 2px ${withAlpha(red.light[30], '30')}`,},components: {@@ -298,18 +337,18 @@ export const butterTheme = defineTheme({// redirect that token (not just `color`) to the brand blue so the text// itself turns blue, not only the container.base: {- color: 'light-dark(#225BFF, #FDEE8C)',- '--color-text-primary': 'light-dark(#225BFF, #FDEE8C)',+ color: lightDark(accent.light[40], yellow.dark[90]),+ '--color-text-primary': lightDark(accent.light[40], yellow.dark[90]),},},'top-nav-item': {base: {- color: 'light-dark(#6E92FF, #FDEE8CCC)',+ color: lightDark(accent.light[40], withAlpha(yellow.dark[90], 'cc')),},- // Selected item: full brand blue, no pill background — rely on weight +- // color for emphasis. Hover/active keep the neutral overlay.+ // Selected item: a darker Blue stop in light mode and full Butter Yellow+ // in dark mode, with no pill background. Weight + color carry emphasis.selected: {- color: 'light-dark(#225BFF, #FDEE8C)',+ color: lightDark(accent.light[35], yellow.dark[90]),backgroundColor: 'transparent',':hover': {backgroundColor: 'var(--color-overlay-hover)',@@ -330,11 +369,11 @@ export const butterTheme = defineTheme({'variant:secondary': SECONDARY_BUTTON,// Ghost: same accent color as secondary, no background.'variant:ghost': {- color: 'light-dark(#225BFF, #FDEE8C)',+ color: lightDark(accent.light[40], yellow.dark[90]),},'variant:destructive': {- backgroundColor: 'light-dark(#ffdad3, #f4b8ae)',- color: 'light-dark(#550000, #6d211c)',+ backgroundColor: lightDark(red.light[90], red.dark[80]),+ color: lightDark(red.light[10], red.dark[25]),},},@@ -347,27 +386,27 @@ export const butterTheme = defineTheme({paddingBlock: '0',paddingInline: 'var(--spacing-3)',},- // Vivid semantic badges — pinned to the brand colors from the spec.- // Info uses the Blue palette source (NOT the brand accent #225BFF).+ // Vivid semantic badges — pinned to the reviewed semantic stops.+ // Info uses Butter’s lighter accent stop rather than its signature stop.'variant:info': {- backgroundColor: '#4883fd',- color: '#ffffff',+ backgroundColor: accent.light[55],+ color: neutral.light[15],},'variant:neutral': {- backgroundColor: '#ffee7b',- color: '#225BFF',+ backgroundColor: yellow.light[90],+ color: accent.light[35],},'variant:success': {- backgroundColor: '#91D143',- color: '#1d1c11',+ backgroundColor: green.light[70],+ color: neutral.light[15],},'variant:warning': {- backgroundColor: '#ffc502',- color: '#1d1c11',+ backgroundColor: yellow.light[80],+ color: neutral.light[15],},'variant:error': {- backgroundColor: '#fc473b',- color: '#ffffff',+ backgroundColor: red.light[60],+ color: neutral.light[15],},},@@ -377,28 +416,28 @@ export const butterTheme = defineTheme({// matching the badge palette. Scoped to the banner root, doesn't leak.banner: {'status:info': {- '--color-accent-muted': '#4883fd',- '--color-text-primary': '#ffffff',- '--color-text-secondary': '#ffffff',- '--color-accent': '#ffffff',+ '--color-accent-muted': accent.light[55],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-accent': neutral.light[15],},'status:success': {- '--color-success-muted': '#91D143',- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#1d1c11',- '--color-success': '#1d1c11',+ '--color-success-muted': green.light[70],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-success': neutral.light[15],},'status:warning': {- '--color-warning-muted': '#ffc502',- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#1d1c11',- '--color-warning': '#1d1c11',+ '--color-warning-muted': yellow.light[80],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-warning': neutral.light[15],},'status:error': {- '--color-error-muted': '#fc473b',- '--color-text-primary': '#ffffff',- '--color-text-secondary': '#ffffff',- '--color-error': '#ffffff',+ '--color-error-muted': red.light[60],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-error': neutral.light[15],},},@@ -408,64 +447,64 @@ export const butterTheme = defineTheme({padding: 'var(--spacing-4)',},'variant:info': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:success': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:warning': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:error': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:blue': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:cyan': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:gray': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:green': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:orange': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:pink': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:purple': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:red': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:teal': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:yellow': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:muted': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},},@@ -475,22 +514,22 @@ export const butterTheme = defineTheme({},},- // Progress bar — white track in light, warm brown in dark. Vivid+ // Progress bar — pale track in light, warm brown in dark. Vivid// semantic fills match the banner colors (Success / Warning / Error).'progress-bar-track': {base: {- backgroundColor: 'light-dark(#e5e3d4, #725538)',+ backgroundColor: lightDark(neutral.light[85], neutral.dark[40]),},},'progress-bar-fill': {'variant:success': {- backgroundColor: '#91D143',+ backgroundColor: green.light[70],},'variant:warning': {- backgroundColor: '#ffc502',+ backgroundColor: yellow.light[80],},'variant:error': {- backgroundColor: '#fc473b',+ backgroundColor: red.light[60],},},@@ -499,16 +538,16 @@ export const butterTheme = defineTheme({// error / success" surface as the standalone banner.'field-status': {'type:success': {- backgroundColor: '#91D143',- color: '#1d1c11',+ backgroundColor: green.light[70],+ color: neutral.light[15],},'type:warning': {- backgroundColor: '#ffc502',- color: '#1d1c11',+ backgroundColor: yellow.light[80],+ color: neutral.light[15],},'type:error': {- backgroundColor: '#fc473b',- color: '#ffffff',+ backgroundColor: red.light[60],+ color: neutral.light[15],},},@@ -522,9 +561,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'text-area': {base: {@@ -532,9 +571,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'number-input': {base: {@@ -542,9 +581,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'date-input': {base: {@@ -552,9 +591,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'time-input': {base: {@@ -562,9 +601,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},selector: {base: {@@ -572,9 +611,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},'variant:secondary': SECONDARY_SELECTOR,},'multi-selector': {@@ -583,9 +622,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},'variant:secondary': SECONDARY_SELECTOR,},'complex-selector': {'variant:secondary': SECONDARY_COMPLEX_SELECTOR},@@ -595,9 +634,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},tokenizer: {base: {@@ -605,9 +644,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},// Display sizes use Sarina — the signature buttery display@@ -632,22 +671,23 @@ export const butterTheme = defineTheme({});/**- * Raw tonal palettes — generated from design-spec source hexes via the- * same CIELab algorithm `ThemePalettePreview` uses for the displayed- * strip, so the rendered ramp and the consumed token values are 1:1.+ * Frozen released compatibility palettes. These ramps preserve the public+ * `butterPalettes` shape and values for existing consumers; the maintained+ * theme renders selected stops from `butterPalettes.generated.ts` instead.+ * Do not regenerate this object from the private mode-aware palette.*- * Source colors:+ * Historical source labels for this compatibility snapshot:* accent #225BFF neutral #868B99* red #ffc3b8 orange #ffc98d yellow #feee7b* green #bdebb4 cyan #abf1f1 teal #aeefd6* blue #cdd5fc purple #e6c2ff pink #fec0f5* error #fc473b warning #ffc502 success #91D143*- * Categorical sources are the pastel pill hexes from the design spec so- * each ramp's T85 lands directly on the card / badge background color.- * Semantic sources are vivid so the ramp anchors near the badge fill.+ * The original snapshot used pastel categorical source labels and vivid semantic+ * source labels. The current maintained theme does not derive from this object.*- * Regenerate with: node packages/themes/butter/scripts/generate-palettes.mjs+ * These notes describe the released snapshot and are not regeneration+ * instructions for the maintained theme.*/export const butterPalettes = {blue: {diff --git a/packages/cli/assets/templates/themes/butter/palette.config.json b/packages/cli/assets/templates/themes/butter/palette.config.jsonnew file mode 100644index 0000000000..d108e96512--- /dev/null+++ b/packages/cli/assets/templates/themes/butter/palette.config.json@@ -0,0 +1,484 @@+{+ "recipe": "astryx-oklch-v1",+ "vibrancy": 48,+ "neutralProfile": "custom",+ "modeStrategy": "light-and-dark",+ "stops": [+ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,+ 95, 100+ ],+ "families": [+ {+ "id": "neutral",+ "name": "Butter Neutral",+ "seed": "#79786a",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#131107",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#261a13",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#2e2117",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3a2a1f",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 35,+ "color": "#49473b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#939184",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 85,+ "color": "#f0edd4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 15,+ "color": "#1d1c11",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c7c4b2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#e5e3d4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "accent",+ "name": "Brand Blue",+ "seed": "#225bff",+ "anchors": [+ {+ "mode": "light",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Blue",+ "seed": "#5681ff",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Cyan",+ "seed": "#60cfd3",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "green",+ "name": "Green",+ "seed": "#5dce5f",+ "anchors": []+ },+ {+ "id": "orange",+ "name": "Orange",+ "seed": "#ffa347",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Pink",+ "seed": "#f680e8",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Purple",+ "seed": "#b780f6",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red",+ "seed": "#ff7553",+ "anchors": []+ },+ {+ "id": "teal",+ "name": "Teal",+ "seed": "#6cd9a8",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Butter Yellow",+ "seed": "#fdee8c",+ "anchors": [+ {+ "mode": "light",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ }+ ]+ }+ ]+}diff --git a/packages/themes/butter/README.md b/packages/themes/butter/README.mdindex eac3fa39a0..1b5d38abce 100644--- a/packages/themes/butter/README.md+++ b/packages/themes/butter/README.md@@ -22,29 +22,36 @@ function App() {## Colors-Source palette:--| Role | Hex |-| ------- | --------- |-| Accent | `#225BFF` |-| Yellow | `#FDEE8C` |-| Error | `#FC473B` |-| Warning | `#FFC502` |-| Success | `#91D143` |-| Info | `#4883FD` |--Each color (Blue, Cyan, Green, Orange, Pink, Purple, Red, Teal, Yellow,-plus Error / Warning / Success) is published as a smooth 21-step tonal-palette in `butterPalettes`. Categorical badges, cards, and banner text-roles read from these palettes via:--- `T90` light / `T15` dark: background surfaces-- `T80` light / `T25` dark: borders, dark-mode text-- `T25` light / `T80` dark: light-mode text, icons--To regenerate the palettes after changing a source color, edit the-`SOURCES` map in `scripts/generate-palettes.mjs`, run the script, and-paste the output back into `src/butterTheme.ts`.+Butter's approved palette is generated from `palette.config.json`. It contains+complete light and dark ramps for the warm neutral, signature blue, and nine+categorical families. `#225BFF` and `#FDEE8C` are exact anchors for Butter's+signature blue and yellow. Green remains anchorless so its ramp stays smooth.++Theme and component roles use semantic tokens backed by the small generated+`butterPaletteRefs` selection. Components should consume those semantic tokens,+not raw palette values. Error, warning, and success share Red, Yellow, and Green+rather than maintaining duplicate ramps. Data-visualization colors remain+separate and are not overridden by this theme.++The existing `butterPalettes` export remains unchanged as a compatibility+snapshot. The complete reviewed mode-aware palette is private to authoring,+tests, and selected-reference generation, so adopting it does not change the+public API shape or force the full candidate into theme evaluation.++After changing `palette.config.json`, regenerate the candidate and receipt with:++```bash+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+```++Keep the standard copyright header on the committed TypeScript candidate, review+the preview in both modes, remove `.tmp-butter-palette-preview.html`, then run+`pnpm generate:butter-palette-refs`. Keep the theme package and CLI template+copies synchronized.## Typographydiff --git a/packages/themes/butter/butter.spec.md b/packages/themes/butter/butter.spec.mdnew file mode 100644index 0000000000..8c324beac7--- /dev/null+++ b/packages/themes/butter/butter.spec.md@@ -0,0 +1,214 @@+---+schema_version: 2+template_version: 2+kind: theme+id: theme:butter+authority: current+approved_by: rubyycheung+approved_at: 2026-10-17+review_triggers:+ [tokens, palette-values, component-mappings, contrast, artifacts]+verified_by:+ [+ packages/themes/butter/src/butterTheme.test.ts,+ packages/themes/butter/src/butterColorMapping.test.ts,+ packages/themes/butter/src/butterPalettes.test.ts,+ scripts/generate-butter-palette-refs.test.mjs,+ ]+package: '@astryxdesign/theme-butter'+source_theme: packages/themes/butter/src/butterTheme.ts+references:+ [+ architecture:theme-authoring-contract,+ architecture:theme-tokens,+ architecture:theme-compilation,+ ]+---++# Butter theme specification++## Intent and audience++Butter is a warm golden theme with a signature saturated Blue accent, Butter+Yellow, creamy neutral surfaces, and soft categorical colors. It serves+experiences that want playful warmth without losing semantic clarity in light+and dark modes.++## Inheritance and base++Butter starts from Astryx core defaults and overrides selected typography,+motion, radius, shadow, semantic color, syntax, icon, and component values. It+does not extend another published package theme.++## Portable token overrides++The exact maintained values live in `source_theme`. Butter owns its light and+dark surface ladders, signature accents, status and categorical selections,+syntax colors, color-bearing shadows, and existing component mappings. Portable+token vocabulary remains owned by `architecture:theme-tokens`.++## Theme-local role definitions++Butter defines no public theme-local token names. Its package-specific decisions+use existing portable tokens and component mapping slots.++## Tonal palette definitions++Butter owns complete private light and dark ramps for warm neutral, accent,+blue, cyan, green, orange, pink, purple, red, teal, and yellow. The committed+request, generated module, and receipt reproduce the accepted+`astryx-oklch-v1` result.++Accent Light 40 is exact brand Blue `#225BFF`. Yellow Dark 90 is exact Butter+Yellow `#FDEE8C`. Green and Red remain anchorless and smooth. Error, Warning, and+Success roles use the Red, Yellow, and Green families rather than duplicate+semantic palette families.++Palette generation is explicit maintenance work and never runs during a normal+theme build.++## Component and state mappings++Butter maps existing semantic, categorical, syntax, and color-bearing effect+roles to named Butter palette stops. Status roles and matching categorical+families share Red, Yellow, and Green sources. Components consume semantic+tokens rather than the complete palette.++Butter defines no additional component states or data-visualization colors.++## Compatibility and migration++The released `butterPalettes` object remains byte-identical in its established+package export. Complete mode-aware ramps remain private to authoring, mapping,+tests, and review tooling.++Consumers can extend `butterTheme` and override color, syntax, shadow, and+component values while preserving the released package contract.++## Accessibility and contrast evidence++Butter-specific mapping and rendered-component evidence covers light and dark+semantic and categorical states. A palette stop alone is not an accessibility+claim; contextual component evidence remains authoritative.++Butter's maintained Badge, Banner, FieldStatus, and TopNav text pairings use+named palette stops that clear normal-text AA in their rendered contexts:++- info Badge, Banner title, Banner body, and FieldStatus text use Neutral Light+ 15 on Accent Light 55 at 4.85:1;+- error Badge, Banner title, Banner body, and FieldStatus text use Neutral Light+ 15 on Red Light 60 at 5.02:1;+- the neutral Badge uses Accent Light 35 on exact Butter Yellow at 5.49:1;+- light-mode TopNav items use Accent Light 40 at 5.01:1 or Accent Light 35+ at 6.20:1 on the warm navigation surface; and+- success and warning states retain their darker Neutral Light 15 text.++These checks cover normal-sized text in each named component state; every pairing+clears the 4.5:1 normal-text threshold. The same visible status icon and text+label identify semantic states independently of color.++## Build and artifact contract++The package and CLI template carry identical palette requests, generated+candidates, receipts, selected-reference modules, and theme mappings. The+selected-reference module is deterministically derived from `source_theme` and+the committed private palette. A non-writing check fails for missing, extra,+stale, or invalid references.++Normal package builds consume committed references and never regenerate palette+values.++## Verification map++| Theme contract | Evidence | Representative states | Failure signal |+| ----------------------- | ---------------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------- |+| Palette identity | Config, generated module, receipt, reproduction test | light and dark; every family | Regeneration changes accepted values or stable provenance. |+| Signature colors | Palette and mapping tests | Blue accent; Butter Yellow; warm body | An exact signature value moves. |+| Role mapping | Butter mapping and theme tests | semantic, categorical, syntax, effects | A maintained role bypasses selected Butter references. |+| Public compatibility | Legacy object test and package build | keys and every released value | The released object differs from its established shape or values. |+| Package/template parity | Byte comparison and build | package and CLI template | Copies diverge. |++## Decision log++### DEC-1 — Butter owns one reproducible mode-aware palette++**Reference:** `theme:butter/DEC-1`+**Decider:** `rubyycheung`, `2026-10-17`++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.++Rejected: inheriting another theme's palette or regenerating values during+normal builds.++### DEC-2 — Signature Blue and Butter Yellow remain exact++**Reference:** `theme:butter/DEC-2`+**Decider:** `rubyycheung`, `2026-10-17`++Accent Light 40 remains `#225BFF`, and Yellow Dark 90 remains `#FDEE8C`. These+anchors preserve Butter's recognizable brand accents while surrounding stops+remain smooth.++Rejected: approximating either signature color with an unanchored stop.++### DEC-3 — Status roles reuse categorical color families++**Reference:** `theme:butter/DEC-3`+**Decider:** `rubyycheung`, `2026-10-17`++Error, Warning, and Success roles map through Red, Yellow, and Green. The private+palette contains no duplicate Error, Warning, or Success families.++Rejected: parallel semantic ramps that duplicate categorical hue ownership.++### DEC-4 — Existing roles use selected Butter palette references++**Reference:** `theme:butter/DEC-4`+**Decider:** `rubyycheung`, `2026-10-17`++Butter's semantic, categorical, syntax, and color-bearing effect values use+named Butter palette stops. Alpha variants derive from selected stops, and+mappings preserve role intent rather than applying blind nearest-color matches.++Rejected: adding data-visualization overrides or letting components consume the+complete private palette.++### DEC-5 — The released palette object stays compatible++**Reference:** `theme:butter/DEC-5`+**Decider:** `rubyycheung`, `2026-10-17`++`butterPalettes` keeps its released shape and values. Complete mode-aware ramps+remain private authoring data.++Rejected: forcing existing consumers onto the generated palette shape.++### DEC-6 — Runtime references are deterministic and minimal++**Reference:** `theme:butter/DEC-6`+**Decider:** `rubyycheung`, `2026-10-17`++Butter's selected-reference module contains exactly the family, mode, and stop+values referenced by the maintained theme. Write mode synchronizes package and+CLI-template outputs; check mode compares the complete projection without+writing.++Rejected: bundling the complete private palette or maintaining a manual+selection manifest.++## Open questions++- **OQ1 — Cross-theme contrast methodology** (`human-design`): Which current+ design record owns the human visual and accessibility methodology used to+ judge token and color pairings? No current design record owns this dependency;+ Butter owns only its theme-specific pairings, exceptions, and measured evidence.++## Content boundary++This record owns Butter's intent, selected token and palette mappings, required+states, theme-specific exceptions, measured receipts, known gaps,+compatibility, artifacts, and evidence. Shared generation mechanics and token+vocabulary belong to architecture and tooling. Component behavior belongs to+component or family records. Consumer syntax belongs to consumer documentation.diff --git a/packages/themes/butter/package.json b/packages/themes/butter/package.jsonindex ae19fb3468..c60f0d0eb5 100644--- a/packages/themes/butter/package.json+++ b/packages/themes/butter/package.json@@ -50,11 +50,12 @@"files": ["dist","src",+ "palette.config.json","fonts.css","fonts.css.d.ts"],"scripts": {- "build": "node ../../../scripts/clean-dist.mjs && astryx theme build src/butterTheme.ts -o dist/theme.css --icons-specifier ./icons.mjs && tsup && tsc --project tsconfig.build.json && node ../../../scripts/check-fully-specified.mjs"+ "build": "node ../../../scripts/clean-dist.mjs && node ../../../scripts/generate-butter-palette-refs.mjs --check && astryx theme build src/butterTheme.ts -o dist/theme.css --icons-specifier ./icons.mjs && tsup && tsc --project tsconfig.build.json && node ../../../scripts/check-fully-specified.mjs"},"dependencies": {"lucide-react": "^1.18.0"diff --git a/packages/themes/butter/palette.config.json b/packages/themes/butter/palette.config.jsonnew file mode 100644index 0000000000..d108e96512--- /dev/null+++ b/packages/themes/butter/palette.config.json@@ -0,0 +1,484 @@+{+ "recipe": "astryx-oklch-v1",+ "vibrancy": 48,+ "neutralProfile": "custom",+ "modeStrategy": "light-and-dark",+ "stops": [+ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,+ 95, 100+ ],+ "families": [+ {+ "id": "neutral",+ "name": "Butter Neutral",+ "seed": "#79786a",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#131107",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#261a13",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#2e2117",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3a2a1f",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 35,+ "color": "#49473b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#939184",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 85,+ "color": "#f0edd4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 15,+ "color": "#1d1c11",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c7c4b2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#e5e3d4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "accent",+ "name": "Brand Blue",+ "seed": "#225bff",+ "anchors": [+ {+ "mode": "light",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Blue",+ "seed": "#5681ff",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Cyan",+ "seed": "#60cfd3",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "green",+ "name": "Green",+ "seed": "#5dce5f",+ "anchors": []+ },+ {+ "id": "orange",+ "name": "Orange",+ "seed": "#ffa347",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Pink",+ "seed": "#f680e8",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Purple",+ "seed": "#b780f6",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red",+ "seed": "#ff7553",+ "anchors": []+ },+ {+ "id": "teal",+ "name": "Teal",+ "seed": "#6cd9a8",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Butter Yellow",+ "seed": "#fdee8c",+ "anchors": [+ {+ "mode": "light",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ }+ ]+ }+ ]+}diff --git a/packages/themes/butter/src/__snapshots__/butterPalettes.test.ts.snap b/packages/themes/butter/src/__snapshots__/butterPalettes.test.ts.snapnew file mode 100644index 0000000000..e129c20f00--- /dev/null+++ b/packages/themes/butter/src/__snapshots__/butterPalettes.test.ts.snap@@ -0,0 +1,328 @@+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html++exports[`butter palette artifact > matches the complete released legacy object 1`] = `+{+ "accent": {+ "0": "#000000",+ "10": "#00136c",+ "100": "#ffffff",+ "15": "#001c7e",+ "20": "#002592",+ "25": "#002fa7",+ "30": "#0039be",+ "35": "#0043d7",+ "40": "#004df0",+ "45": "#0759ff",+ "5": "#00085e",+ "50": "#4a67ff",+ "55": "#6875ff",+ "60": "#8083ff",+ "65": "#9492ff",+ "70": "#a6a1ff",+ "75": "#b6b0ff",+ "80": "#c6bfff",+ "85": "#d5cfff",+ "90": "#e3dfff",+ "95": "#f1efff",+ },+ "blue": {+ "0": "#000000",+ "10": "#001b4c",+ "100": "#ffffff",+ "15": "#002558",+ "20": "#062f63",+ "25": "#203a6c",+ "30": "#324575",+ "35": "#41517d",+ "40": "#505d86",+ "45": "#5f698f",+ "5": "#001041",+ "50": "#6d7698",+ "55": "#7a82a6",+ "60": "#878fb3",+ "65": "#949cc1",+ "70": "#a2aacf",+ "75": "#afb7dd",+ "80": "#bdc5eb",+ "85": "#cbd3f9",+ "90": "#dbe1ff",+ "95": "#edf0ff",+ },+ "cyan": {+ "0": "#000000",+ "10": "#00262a",+ "100": "#ffffff",+ "15": "#003034",+ "20": "#003a3e",+ "25": "#004649",+ "30": "#005255",+ "35": "#005e61",+ "40": "#006a6d",+ "45": "#1f7678",+ "5": "#001d1e",+ "50": "#3c8183",+ "55": "#4a8e90",+ "60": "#579c9d",+ "65": "#65a9aa",+ "70": "#72b7b8",+ "75": "#80c4c5",+ "80": "#8dd2d3",+ "85": "#9be0e1",+ "90": "#a9eff0",+ "95": "#b7fdfe",+ },+ "error": {+ "0": "#000000",+ "10": "#530000",+ "100": "#ffffff",+ "15": "#600000",+ "20": "#6d0000",+ "25": "#771210",+ "30": "#82261e",+ "35": "#8c372c",+ "40": "#96463b",+ "45": "#a0564a",+ "5": "#470000",+ "50": "#a96559",+ "55": "#b77265",+ "60": "#c57e72",+ "65": "#d48b7e",+ "70": "#e2998b",+ "75": "#f1a698",+ "80": "#ffb4a6",+ "85": "#ffc7bc",+ "90": "#ffdad2",+ "95": "#ffece8",+ },+ "green": {+ "0": "#000000",+ "10": "#002800",+ "100": "#ffffff",+ "15": "#003100",+ "20": "#003c00",+ "25": "#004800",+ "30": "#01530d",+ "35": "#1f5f1f",+ "40": "#346a30",+ "45": "#467640",+ "5": "#001f00",+ "50": "#578151",+ "55": "#648e5d",+ "60": "#709c6a",+ "65": "#7da976",+ "70": "#8ab783",+ "75": "#98c490",+ "80": "#a5d29d",+ "85": "#b3e0ab",+ "90": "#c1efb8",+ "95": "#cffdc6",+ },+ "neutral": {+ "0": "#000000",+ "10": "#101c2f",+ "100": "#ffffff",+ "15": "#1b263a",+ "20": "#273045",+ "25": "#333b4f",+ "30": "#3f4759",+ "35": "#4b5264",+ "40": "#585e6f",+ "45": "#656a79",+ "5": "#051124",+ "50": "#727784",+ "55": "#7f8491",+ "60": "#8c909f",+ "65": "#999eac",+ "70": "#a6abba",+ "75": "#b4b9c7",+ "80": "#c1c6d5",+ "85": "#cfd4e3",+ "90": "#dde2f2",+ "95": "#ebf0ff",+ },+ "orange": {+ "0": "#000000",+ "10": "#381200",+ "100": "#ffffff",+ "15": "#461b00",+ "20": "#542400",+ "25": "#622e00",+ "30": "#6d3a00",+ "35": "#794700",+ "40": "#845406",+ "45": "#906121",+ "5": "#2d0600",+ "50": "#9b6e36",+ "55": "#a97b42",+ "60": "#b7874e",+ "65": "#c6945b",+ "70": "#d4a267",+ "75": "#e3af74",+ "80": "#f2bd81",+ "85": "#ffcb8e",+ "90": "#ffdcb6",+ "95": "#ffedda",+ },+ "pink": {+ "0": "#000000",+ "10": "#490048",+ "100": "#ffffff",+ "15": "#560054",+ "20": "#62005f",+ "25": "#6c0a68",+ "30": "#762371",+ "35": "#80357a",+ "40": "#894583",+ "45": "#93558c",+ "5": "#3c003d",+ "50": "#9c6496",+ "55": "#aa71a3",+ "60": "#b77eb0",+ "65": "#c58bbe",+ "70": "#d398cc",+ "75": "#e2a6da",+ "80": "#f0b3e8",+ "85": "#ffc1f6",+ "90": "#ffd5fb",+ "95": "#ffeafd",+ },+ "purple": {+ "0": "#000000",+ "10": "#2b005c",+ "100": "#ffffff",+ "15": "#390268",+ "20": "#461373",+ "25": "#52237b",+ "30": "#5d3283",+ "35": "#69408b",+ "40": "#744e92",+ "45": "#7f5c9a",+ "5": "#1e004f",+ "50": "#8b6aa2",+ "55": "#9877b0",+ "60": "#a584bd",+ "65": "#b391cb",+ "70": "#c19ed9",+ "75": "#cfabe8",+ "80": "#ddb9f6",+ "85": "#eac8ff",+ "90": "#f2daff",+ "95": "#f9ecff",+ },+ "red": {+ "0": "#000000",+ "10": "#490000",+ "100": "#ffffff",+ "15": "#550000",+ "20": "#62100f",+ "25": "#6d211c",+ "30": "#773029",+ "35": "#823f36",+ "40": "#8c4d44",+ "45": "#955b52",+ "5": "#3e0000",+ "50": "#9f6961",+ "55": "#ad766d",+ "60": "#bb837a",+ "65": "#c99087",+ "70": "#d79d94",+ "75": "#e6aba1",+ "80": "#f4b8ae",+ "85": "#ffc7bd",+ "90": "#ffdad3",+ "95": "#ffece8",+ },+ "success": {+ "0": "#000000",+ "10": "#092300",+ "100": "#ffffff",+ "15": "#0b2e00",+ "20": "#043b00",+ "25": "#004700",+ "30": "#005400",+ "35": "#036100",+ "40": "#136e00",+ "45": "#277b00",+ "5": "#001a00",+ "50": "#448700",+ "55": "#529400",+ "60": "#60a105",+ "65": "#6eaf1d",+ "70": "#7cbd2e",+ "75": "#8bcb3c",+ "80": "#99d94b",+ "85": "#a7e758",+ "90": "#b5f566",+ "95": "#ccff88",+ },+ "teal": {+ "0": "#000000",+ "10": "#00280b",+ "100": "#ffffff",+ "15": "#003216",+ "20": "#003d22",+ "25": "#00482d",+ "30": "#005439",+ "35": "#005f45",+ "40": "#136b52",+ "45": "#30775f",+ "5": "#001f00",+ "50": "#46826d",+ "55": "#528f79",+ "60": "#5f9d86",+ "65": "#6caa93",+ "70": "#7ab8a0",+ "75": "#87c5ae",+ "80": "#94d3bb",+ "85": "#a2e1c9",+ "90": "#b0f0d7",+ "95": "#befee5",+ },+ "warning": {+ "0": "#000000",+ "10": "#301800",+ "100": "#ffffff",+ "15": "#3b2200",+ "20": "#472c00",+ "25": "#543700",+ "30": "#614200",+ "35": "#6f4d00",+ "40": "#7d5800",+ "45": "#8b6400",+ "5": "#270c00",+ "50": "#9a7000",+ "55": "#a97d00",+ "60": "#b88900",+ "65": "#c89600",+ "70": "#d8a300",+ "75": "#e7b100",+ "80": "#f7be00",+ "85": "#ffcd51",+ "90": "#ffde9c",+ "95": "#ffeed0",+ },+ "yellow": {+ "0": "#000000",+ "10": "#271c00",+ "100": "#ffffff",+ "15": "#2e2700",+ "20": "#373200",+ "25": "#413e00",+ "30": "#4c4a00",+ "35": "#575600",+ "40": "#646200",+ "45": "#726e00",+ "5": "#1e1200",+ "50": "#817a00",+ "55": "#8e860e",+ "60": "#9c9320",+ "65": "#aba02f",+ "70": "#b9ae3d",+ "75": "#c7bb4a",+ "80": "#d6c957",+ "85": "#e5d765",+ "90": "#f4e572",+ "95": "#fff294",+ },+}+`;diff --git a/packages/themes/butter/src/butterColorMapping.test.ts b/packages/themes/butter/src/butterColorMapping.test.tsnew file mode 100644index 0000000000..b987f652bb--- /dev/null+++ b/packages/themes/butter/src/butterColorMapping.test.ts@@ -0,0 +1,64 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++import {describe, expect, it} from 'vitest';+import {resolveThemeTokens} from '@astryxdesign/core/theme';+import {palette as butterModePalettes} from './butterPalettes.generated';+import {butterTheme} from './butterTheme';++const categoricalFamilies = [+ 'blue',+ 'cyan',+ 'orange',+ 'pink',+ 'purple',+ 'red',+ 'teal',+ 'yellow',+] as const;++describe('butter palette mapping', () => {+ it('preserves the signature accents and warm body surfaces', () => {+ const light = resolveThemeTokens(butterTheme, {mode: 'light'});+ const dark = resolveThemeTokens(butterTheme, {mode: 'dark'});+ expect(light['--color-accent']).toBe(butterModePalettes.accent.light[40]);+ expect(dark['--color-accent']).toBe(butterModePalettes.yellow.dark[90]);+ expect(light['--color-background-body']).toBe(+ butterModePalettes.neutral.light[95],+ );+ expect(dark['--color-background-body']).toBe(+ butterModePalettes.neutral.dark[10],+ );+ });++ it.each(['light', 'dark'] as const)(+ 'maps categorical roles to reviewed %s stops',+ mode => {+ const tokens = resolveThemeTokens(butterTheme, {mode});+ for (const family of categoricalFamilies) {+ const ramp = butterModePalettes[family][mode];+ const backgroundStop = family === 'yellow' ? 85 : 90;+ const borderStop = family === 'yellow' ? 70 : 80;+ const foregroundStop = 25;+ expect(tokens[`--color-background-${family}`]).toBe(+ ramp[backgroundStop],+ );+ expect(tokens[`--color-border-${family}`]).toBe(ramp[borderStop]);+ expect(tokens[`--color-icon-${family}`]).toBe(ramp[foregroundStop]);+ expect(tokens[`--color-text-${family}`]).toBe(ramp[foregroundStop]);+ }+ },+ );++ it('uses one smooth Green family for categorical and success roles', () => {+ const light = resolveThemeTokens(butterTheme, {mode: 'light'});+ const dark = resolveThemeTokens(butterTheme, {mode: 'dark'});+ expect(light['--color-success']).toBe(butterModePalettes.green.light[25]);+ expect(dark['--color-success']).toBe(butterModePalettes.green.dark[70]);+ expect(light['--color-background-green']).toBe(+ butterModePalettes.green.light[90],+ );+ expect(dark['--color-background-green']).toBe(+ butterModePalettes.green.dark[90],+ );+ });+});diff --git a/packages/themes/butter/src/butterPaletteRefs.generated.ts b/packages/themes/butter/src/butterPaletteRefs.generated.tsnew file mode 100644index 0000000000..df32f360ca--- /dev/null+++ b/packages/themes/butter/src/butterPaletteRefs.generated.ts@@ -0,0 +1,54 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++// Generated from the committed full palette for the stops used by Butter's+// theme source. Regenerate with `pnpm generate:butter-palette-refs`.+// Keep the complete palette available for authoring and audits without+// making consumers pay for unused palette stops.+// prettier-ignore+export const butterPaletteRefs = {+ purple: {+ light: {25: '#52237b', 80: '#ddb9f6', 90: '#f2daff'},+ dark: {25: '#52237b', 80: '#ddb9f6', 90: '#f2daff'},+ },+ green: {+ light: {25: '#004a05', 70: '#7bbf7a', 80: '#a2d7a0', 85: '#b6e3b4', 90: '#caeec8'},+ dark: {15: '#013004', 20: '#063c0a', 70: '#83bc82', 80: '#a8d4a6', 90: '#cdedcc'},+ },+ neutral: {+ light: {0: '#000000', 15: '#1d1c11', 30: '#4a4732', 45: '#605f52', 55: '#79786a', 70: '#adac9e', 75: '#c7c4b2', 80: '#d6d3b8', 85: '#e5e3d4', 90: '#f3f2e2', 95: '#fdfbe4', 100: '#ffffff'},+ dark: {0: '#000000', 5: '#131107', 10: '#261a13', 15: '#2e2117', 20: '#3a2a1f', 30: '#4a4732', 35: '#49473b', 40: '#725538', 45: '#605f52', 60: '#939184', 70: '#adac9e', 80: '#d6d3b8', 85: '#f0edd4', 90: '#f3f2e2', 95: '#fdfbe4', 100: '#ffffff'},+ },+ orange: {+ light: {25: '#622e00', 80: '#f2bd81', 90: '#ffdcb6'},+ dark: {25: '#622e00', 80: '#f2bd81', 90: '#ffdcb6'},+ },+ blue: {+ light: {25: '#203a6c', 80: '#bdc5eb', 90: '#dbe1ff'},+ dark: {25: '#203a6c', 80: '#bdc5eb', 90: '#dbe1ff'},+ },+ red: {+ light: {10: '#3b0200', 25: '#6f1400', 30: '#821b00', 60: '#e56241', 80: '#ffb09b', 90: '#ffd9cf', 95: '#ffece7'},+ dark: {15: '#4c0700', 25: '#6f1400', 80: '#ffb09b', 85: '#ffc5b5', 90: '#ffd9cf'},+ },+ yellow: {+ light: {25: '#443c00', 30: '#514700', 70: '#bfae35', 80: '#dfcf5b', 85: '#f0df72', 90: '#fdee8c', 95: '#fff7c0'},+ dark: {15: '#2c2600', 25: '#443c00', 70: '#bcae4e', 75: '#cdbe59', 85: '#eedf75', 90: '#fdee8c'},+ },+ teal: {+ light: {25: '#00482d', 80: '#94d3bb', 90: '#b0f0d7'},+ dark: {25: '#00482d', 80: '#94d3bb', 90: '#b0f0d7'},+ },+ accent: {+ light: {35: '#194ce8', 40: '#225bff', 55: '#4d82ff'},+ },+ cyan: {+ light: {25: '#004649', 80: '#8dd2d3', 90: '#a9eff0'},+ dark: {25: '#004649', 80: '#8dd2d3', 90: '#a9eff0'},+ },+ pink: {+ light: {25: '#6c0a68', 80: '#f0b3e8', 90: '#ffd5fb'},+ dark: {25: '#6c0a68', 80: '#f0b3e8', 90: '#ffd5fb'},+ },+} as const;++export default butterPaletteRefs;diff --git a/packages/themes/butter/src/butterPalettes.generated.receipt.json b/packages/themes/butter/src/butterPalettes.generated.receipt.jsonnew file mode 100644index 0000000000..16221047c6--- /dev/null+++ b/packages/themes/butter/src/butterPalettes.generated.receipt.json@@ -0,0 +1,1499 @@+{+ "schemaVersion": 1,+ "recipe": "astryx-oklch-v1",+ "generatorVersion": "palette-generator-v1",+ "candidateFormatVersion": "palette-typescript-v1",+ "candidateSha256": "051a6b421e16af49a4d8b9c63979d393925caa8b6f6a79bf4288199768789c97",+ "preview": {+ "version": "palette-preview-v1",+ "sha256": "bc0e1c3dc37830ae9124485a63dd510b7e08def0ebc5b235f50cba3ed2c1c618"+ },+ "request": {+ "recipe": "astryx-oklch-v1",+ "vibrancy": 48,+ "neutralProfile": "custom",+ "modeStrategy": "light-and-dark",+ "stops": [+ 0,+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "families": [+ {+ "id": "neutral",+ "name": "Butter Neutral",+ "seed": "#79786a",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#131107",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#261a13",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#2e2117",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3a2a1f",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 35,+ "color": "#49473b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#939184",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 85,+ "color": "#f0edd4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 15,+ "color": "#1d1c11",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#725538",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c7c4b2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#e5e3d4",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "accent",+ "name": "Brand Blue",+ "seed": "#225bff",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Blue",+ "seed": "#5681ff",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Cyan",+ "seed": "#60cfd3",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#004649",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "green",+ "name": "Green",+ "seed": "#5dce5f",+ "kind": "chromatic",+ "anchors": []+ },+ {+ "id": "orange",+ "name": "Orange",+ "seed": "#ffa347",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Pink",+ "seed": "#f680e8",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Purple",+ "seed": "#b780f6",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red",+ "seed": "#ff7553",+ "kind": "chromatic",+ "anchors": []+ },+ {+ "id": "teal",+ "name": "Teal",+ "seed": "#6cd9a8",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Butter Yellow",+ "seed": "#fdee8c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact"+ }+ ]+ }+ ]+ },+ "diagnostics": {+ "families": {+ "neutral": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.5786304474438384,+ "maximumAdjacentDeltaE": 16.78081513889322,+ "maximumHueDrift": 37.73113036617252,+ "hueIdentityRisk": "yellow-to-brown",+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 15,+ "color": "#1d1c11",+ "policy": "exact",+ "generatedColor": "#1d1c11",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact",+ "generatedColor": "#4a4732",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#725538",+ "policy": "exact",+ "generatedColor": "#725538",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact",+ "generatedColor": "#605f52",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact",+ "generatedColor": "#79786a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact",+ "generatedColor": "#adac9e",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c7c4b2",+ "policy": "exact",+ "generatedColor": "#c7c4b2",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact",+ "generatedColor": "#d6d3b8",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#e5e3d4",+ "policy": "exact",+ "generatedColor": "#e5e3d4",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact",+ "generatedColor": "#f3f2e2",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact",+ "generatedColor": "#fdfbe4",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.3958368714337572,+ "maximumAdjacentDeltaE": 17.772771688672155,+ "maximumHueDrift": 55.44280731693226,+ "hueIdentityRisk": "yellow-to-brown",+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#131107",+ "policy": "exact",+ "generatedColor": "#131107",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#261a13",+ "policy": "exact",+ "generatedColor": "#261a13",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#2e2117",+ "policy": "exact",+ "generatedColor": "#2e2117",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3a2a1f",+ "policy": "exact",+ "generatedColor": "#3a2a1f",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#4a4732",+ "policy": "exact",+ "generatedColor": "#4a4732",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 35,+ "color": "#49473b",+ "policy": "exact",+ "generatedColor": "#49473b",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#725538",+ "policy": "exact",+ "generatedColor": "#725538",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 45,+ "color": "#605f52",+ "policy": "exact",+ "generatedColor": "#605f52",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 55,+ "color": "#79786a",+ "policy": "exact",+ "generatedColor": "#79786a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#939184",+ "policy": "exact",+ "generatedColor": "#939184",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#adac9e",+ "policy": "exact",+ "generatedColor": "#adac9e",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#d6d3b8",+ "policy": "exact",+ "generatedColor": "#d6d3b8",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 85,+ "color": "#f0edd4",+ "policy": "exact",+ "generatedColor": "#f0edd4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f3f2e2",+ "policy": "exact",+ "generatedColor": "#f3f2e2",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 95,+ "color": "#fdfbe4",+ "policy": "exact",+ "generatedColor": "#fdfbe4",+ "deltaE": 0+ }+ ]+ }+ },+ "accent": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.828164326468219,+ "maximumAdjacentDeltaE": 20.37894912303333,+ "maximumHueDrift": 0.4951462912753186,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact",+ "generatedColor": "#225bff",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.6446742601015836,+ "maximumAdjacentDeltaE": 19.655014034387623,+ "maximumHueDrift": 0.5099361206356434,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 40,+ "color": "#225bff",+ "policy": "exact",+ "generatedColor": "#225bff",+ "deltaE": 0+ }+ ]+ }+ },+ "blue": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.174676459917484,+ "maximumAdjacentDeltaE": 19.112238484906783,+ "maximumHueDrift": 10.418361367634134,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact",+ "generatedColor": "#203a6c",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact",+ "generatedColor": "#bdc5eb",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact",+ "generatedColor": "#dbe1ff",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.031479902710204,+ "maximumAdjacentDeltaE": 18.737551010757482,+ "maximumHueDrift": 10.018589080604215,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#203a6c",+ "policy": "exact",+ "generatedColor": "#203a6c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#bdc5eb",+ "policy": "exact",+ "generatedColor": "#bdc5eb",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#dbe1ff",+ "policy": "exact",+ "generatedColor": "#dbe1ff",+ "deltaE": 0+ }+ ]+ }+ },+ "cyan": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.9174836311686585,+ "maximumAdjacentDeltaE": 18.082418660631305,+ "maximumHueDrift": 4.173686409412653,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#004649",+ "policy": "exact",+ "generatedColor": "#004649",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact",+ "generatedColor": "#8dd2d3",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact",+ "generatedColor": "#a9eff0",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.9174836311686585,+ "maximumAdjacentDeltaE": 18.082418660631305,+ "maximumHueDrift": 4.173686409412653,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#004649",+ "policy": "exact",+ "generatedColor": "#004649",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#8dd2d3",+ "policy": "exact",+ "generatedColor": "#8dd2d3",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#a9eff0",+ "policy": "exact",+ "generatedColor": "#a9eff0",+ "deltaE": 0+ }+ ]+ }+ },+ "green": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.245396699608261,+ "maximumAdjacentDeltaE": 19.13154978272725,+ "maximumHueDrift": 1.2209615025973335,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 100+ ],+ "anchors": []+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.03416947855013,+ "maximumAdjacentDeltaE": 18.67952255256301,+ "maximumHueDrift": 0.7145037900080524,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 100+ ],+ "anchors": []+ }+ },+ "orange": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.050184135588038,+ "maximumAdjacentDeltaE": 18.95216660095764,+ "maximumHueDrift": 24.64704679322574,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact",+ "generatedColor": "#622e00",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact",+ "generatedColor": "#f2bd81",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact",+ "generatedColor": "#ffdcb6",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.058268156664758,+ "maximumAdjacentDeltaE": 18.850527798718115,+ "maximumHueDrift": 22.43706415021734,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#622e00",+ "policy": "exact",+ "generatedColor": "#622e00",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f2bd81",+ "policy": "exact",+ "generatedColor": "#f2bd81",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffdcb6",+ "policy": "exact",+ "generatedColor": "#ffdcb6",+ "deltaE": 0+ }+ ]+ }+ },+ "pink": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.0746011417386505,+ "maximumAdjacentDeltaE": 19.562138886240948,+ "maximumHueDrift": 2.8689815936833156,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact",+ "generatedColor": "#6c0a68",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact",+ "generatedColor": "#f0b3e8",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact",+ "generatedColor": "#ffd5fb",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.074388606246993,+ "maximumAdjacentDeltaE": 19.385870095105123,+ "maximumHueDrift": 2.6308143285550614,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#6c0a68",+ "policy": "exact",+ "generatedColor": "#6c0a68",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#f0b3e8",+ "policy": "exact",+ "generatedColor": "#f0b3e8",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#ffd5fb",+ "policy": "exact",+ "generatedColor": "#ffd5fb",+ "deltaE": 0+ }+ ]+ }+ },+ "purple": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.101494918466824,+ "maximumAdjacentDeltaE": 19.541730060540445,+ "maximumHueDrift": 10.295127517158221,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact",+ "generatedColor": "#52237b",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact",+ "generatedColor": "#ddb9f6",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact",+ "generatedColor": "#f2daff",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.118863819762729,+ "maximumAdjacentDeltaE": 19.17416175430863,+ "maximumHueDrift": 10.171095818990466,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#52237b",+ "policy": "exact",+ "generatedColor": "#52237b",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#ddb9f6",+ "policy": "exact",+ "generatedColor": "#ddb9f6",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#f2daff",+ "policy": "exact",+ "generatedColor": "#f2daff",+ "deltaE": 0+ }+ ]+ }+ },+ "red": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.221213833696644,+ "maximumAdjacentDeltaE": 19.621884706160397,+ "maximumHueDrift": 5.87959867281387,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": []+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.1453694025330945,+ "maximumAdjacentDeltaE": 19.346124422908343,+ "maximumHueDrift": 5.781447178539224,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 10,+ 15,+ 20,+ 25,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": []+ }+ },+ "teal": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.974502550535286,+ "maximumAdjacentDeltaE": 18.512034326959434,+ "maximumHueDrift": 6.723119120660385,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact",+ "generatedColor": "#00482d",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact",+ "generatedColor": "#94d3bb",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact",+ "generatedColor": "#b0f0d7",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.9132256827184437,+ "maximumAdjacentDeltaE": 18.512034326959434,+ "maximumHueDrift": 6.958028377309802,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 10,+ 15,+ 20,+ 25,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 25,+ "color": "#00482d",+ "policy": "exact",+ "generatedColor": "#00482d",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 80,+ "color": "#94d3bb",+ "policy": "exact",+ "generatedColor": "#94d3bb",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 90,+ "color": "#b0f0d7",+ "policy": "exact",+ "generatedColor": "#b0f0d7",+ "deltaE": 0+ }+ ]+ }+ },+ "yellow": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.161245526611894,+ "maximumAdjacentDeltaE": 18.232815189537895,+ "maximumHueDrift": 4.146174782493631,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact",+ "generatedColor": "#fdee8c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.180532434598464,+ "maximumAdjacentDeltaE": 18.232815189537895,+ "maximumHueDrift": 4.146174782493631,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 90,+ "color": "#fdee8c",+ "policy": "exact",+ "generatedColor": "#fdee8c",+ "deltaE": 0+ }+ ]+ }+ }+ },+ "coordination": [+ {+ "mode": "light",+ "stop": 50,+ "closestFamilies": [+ "Green",+ "Teal"+ ],+ "minimumFamilyDeltaE": 5.229525172539283,+ "strongestFamily": "Brand Blue",+ "weakestFamily": "Cyan",+ "chromaRatio": 2.174472121772574+ },+ {+ "mode": "dark",+ "stop": 50,+ "closestFamilies": [+ "Green",+ "Teal"+ ],+ "minimumFamilyDeltaE": 4.509449398410727,+ "strongestFamily": "Brand Blue",+ "weakestFamily": "Blue",+ "chromaRatio": 2.1862259709811025+ }+ ]+ }+}diff --git a/packages/themes/butter/src/butterPalettes.generated.ts b/packages/themes/butter/src/butterPalettes.generated.tsnew file mode 100644index 0000000000..e1c1158af9--- /dev/null+++ b/packages/themes/butter/src/butterPalettes.generated.ts@@ -0,0 +1,550 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++// Generated by astryx-oklch-v1. Review before committing.+export const black = '#000000' as const;+export const white = '#ffffff' as const;++// prettier-ignore+export const palette = {+ "neutral": {+ "name": "Butter Neutral",+ "light": {+ "0": "#000000",+ "5": "#100f09",+ "10": "#15150c",+ "15": "#1d1c11",+ "20": "#2a291a",+ "25": "#3b3927",+ "30": "#4a4732",+ "35": "#5c5034",+ "40": "#725538",+ "45": "#605f52",+ "50": "#6d6b5d",+ "55": "#79786a",+ "60": "#89877a",+ "65": "#9c9b8d",+ "70": "#adac9e",+ "75": "#c7c4b2",+ "80": "#d6d3b8",+ "85": "#e5e3d4",+ "90": "#f3f2e2",+ "95": "#fdfbe4",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#131107",+ "10": "#261a13",+ "15": "#2e2117",+ "20": "#3a2a1f",+ "25": "#433827",+ "30": "#4a4732",+ "35": "#49473b",+ "40": "#725538",+ "45": "#605f52",+ "50": "#6c6c5e",+ "55": "#79786a",+ "60": "#939184",+ "65": "#9f9e91",+ "70": "#adac9e",+ "75": "#c2c0aa",+ "80": "#d6d3b8",+ "85": "#f0edd4",+ "90": "#f3f2e2",+ "95": "#fdfbe4",+ "100": "#ffffff"+ }+ },+ "accent": {+ "name": "Brand Blue",+ "light": {+ "0": "#000000",+ "5": "#00073c",+ "10": "#010e55",+ "15": "#02166b",+ "20": "#052185",+ "25": "#0a2ea5",+ "30": "#103cc8",+ "35": "#194ce8",+ "40": "#225bff",+ "45": "#356cff",+ "50": "#4278ff",+ "55": "#4d82ff",+ "60": "#5a8cff",+ "65": "#6c9aff",+ "70": "#81a9ff",+ "75": "#96b8ff",+ "80": "#abc6ff",+ "85": "#c0d5ff",+ "90": "#d5e3ff",+ "95": "#eaf1ff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#010a36",+ "10": "#03134d",+ "15": "#051c61",+ "20": "#0a267a",+ "25": "#0e329d",+ "30": "#133fc3",+ "35": "#194ce6",+ "40": "#225bff",+ "45": "#336bff",+ "50": "#4178ff",+ "55": "#4d81ff",+ "60": "#5b8cfc",+ "65": "#6c9aff",+ "70": "#81a9ff",+ "75": "#96b8ff",+ "80": "#abc6ff",+ "85": "#c0d5ff",+ "90": "#d5e3ff",+ "95": "#eaf1ff",+ "100": "#ffffff"+ }+ },+ "blue": {+ "name": "Blue",+ "light": {+ "0": "#000000",+ "5": "#020e2f",+ "10": "#051941",+ "15": "#0d234f",+ "20": "#182f5d",+ "25": "#203a6c",+ "30": "#2c457d",+ "35": "#37508c",+ "40": "#435c9b",+ "45": "#5068a9",+ "50": "#5d75b7",+ "55": "#6b81c4",+ "60": "#798ed1",+ "65": "#899cdc",+ "70": "#98a9e6",+ "75": "#aab6ec",+ "80": "#bdc5eb",+ "85": "#ccd3f5",+ "90": "#dbe1ff",+ "95": "#edf0ff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#030f2b",+ "10": "#081a3e",+ "15": "#0f234d",+ "20": "#172f5c",+ "25": "#203a6c",+ "30": "#2b457c",+ "35": "#37508a",+ "40": "#435c98",+ "45": "#5168a4",+ "50": "#5e76b1",+ "55": "#6d82bc",+ "60": "#7c8fc8",+ "65": "#8c9cd2",+ "70": "#9caadc",+ "75": "#abb7e6",+ "80": "#bdc5eb",+ "85": "#ccd3f5",+ "90": "#dbe1ff",+ "95": "#edf0ff",+ "100": "#ffffff"+ }+ },+ "cyan": {+ "name": "Cyan",+ "light": {+ "0": "#000000",+ "5": "#001517",+ "10": "#002123",+ "15": "#002e30",+ "20": "#00393c",+ "25": "#004649",+ "30": "#005356",+ "35": "#006063",+ "40": "#006c70",+ "45": "#007a7e",+ "50": "#00878b",+ "55": "#00959a",+ "60": "#01a3a7",+ "65": "#33b0b3",+ "70": "#54bbbd",+ "75": "#71c6c8",+ "80": "#8dd2d3",+ "85": "#9be1e1",+ "90": "#a9eff0",+ "95": "#ccfafb",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001517",+ "10": "#002123",+ "15": "#002e30",+ "20": "#00393c",+ "25": "#004649",+ "30": "#005356",+ "35": "#006063",+ "40": "#006c70",+ "45": "#007a7e",+ "50": "#00888c",+ "55": "#119599",+ "60": "#2aa2a5",+ "65": "#41aeb1",+ "70": "#5ababc",+ "75": "#74c6c7",+ "80": "#8dd2d3",+ "85": "#9ce0e1",+ "90": "#a9eff0",+ "95": "#cef9fa",+ "100": "#ffffff"+ }+ },+ "green": {+ "name": "Green",+ "light": {+ "0": "#000000",+ "5": "#001800",+ "10": "#002400",+ "15": "#003001",+ "20": "#003d03",+ "25": "#004a05",+ "30": "#04570e",+ "35": "#136419",+ "40": "#217125",+ "45": "#2e7e31",+ "50": "#3c8b3d",+ "55": "#4a984a",+ "60": "#58a658",+ "65": "#69b368",+ "70": "#7bbf7a",+ "75": "#8ecb8d",+ "80": "#a2d7a0",+ "85": "#b6e3b4",+ "90": "#caeec8",+ "95": "#ddfadc",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001701",+ "10": "#002401",+ "15": "#013004",+ "20": "#063c0a",+ "25": "#0f4812",+ "30": "#19551c",+ "35": "#246226",+ "40": "#2f6e30",+ "45": "#3b7b3c",+ "50": "#488948",+ "55": "#559655",+ "60": "#63a362",+ "65": "#72b071",+ "70": "#83bc82",+ "75": "#96c894",+ "80": "#a8d4a6",+ "85": "#bbe1b9",+ "90": "#cdedcc",+ "95": "#e0f9df",+ "100": "#ffffff"+ }+ },+ "orange": {+ "name": "Orange",+ "light": {+ "0": "#000000",+ "5": "#260500",+ "10": "#351000",+ "15": "#431a00",+ "20": "#522500",+ "25": "#622e00",+ "30": "#723901",+ "35": "#804404",+ "40": "#8f4f0b",+ "45": "#9e5a13",+ "50": "#ab681b",+ "55": "#ba7423",+ "60": "#c88031",+ "65": "#d48f45",+ "70": "#de9e58",+ "75": "#e8ad6c",+ "80": "#f2bd81",+ "85": "#fbcb96",+ "90": "#ffdcb6",+ "95": "#ffeedb",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#250600",+ "10": "#351000",+ "15": "#431a00",+ "20": "#522500",+ "25": "#622e00",+ "30": "#723900",+ "35": "#814301",+ "40": "#904e02",+ "45": "#9e5a0f",+ "50": "#aa681a",+ "55": "#b7762b",+ "60": "#c3833b",+ "65": "#d0904b",+ "70": "#dc9f5c",+ "75": "#e7ad6e",+ "80": "#f2bd81",+ "85": "#fbcc98",+ "90": "#ffdcb6",+ "95": "#ffeedb",+ "100": "#ffffff"+ }+ },+ "pink": {+ "name": "Pink",+ "light": {+ "0": "#000000",+ "5": "#230021",+ "10": "#360034",+ "15": "#490047",+ "20": "#5b0058",+ "25": "#6c0a68",+ "30": "#7a1976",+ "35": "#892783",+ "40": "#963690",+ "45": "#a3459b",+ "50": "#ae54a7",+ "55": "#b963b2",+ "60": "#c573bc",+ "65": "#d083c8",+ "70": "#da92d2",+ "75": "#e5a3dd",+ "80": "#f0b3e8",+ "85": "#fac3f3",+ "90": "#ffd5fb",+ "95": "#ffeafd",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#22031f",+ "10": "#350332",+ "15": "#490045",+ "20": "#5c0158",+ "25": "#6c0a68",+ "30": "#7a1975",+ "35": "#882882",+ "40": "#95378e",+ "45": "#a2469b",+ "50": "#ad55a5",+ "55": "#b964b1",+ "60": "#c474bc",+ "65": "#cf83c6",+ "70": "#d993d2",+ "75": "#e4a3dc",+ "80": "#f0b3e8",+ "85": "#f7c4f2",+ "90": "#ffd5fb",+ "95": "#ffebfd",+ "100": "#ffffff"+ }+ },+ "purple": {+ "name": "Purple",+ "light": {+ "0": "#000000",+ "5": "#1a052b",+ "10": "#280a40",+ "15": "#361156",+ "20": "#451969",+ "25": "#52237b",+ "30": "#5f2f8a",+ "35": "#6c3a97",+ "40": "#7946a4",+ "45": "#8554b0",+ "50": "#9261bc",+ "55": "#9e6fc6",+ "60": "#aa7dd0",+ "65": "#b78bd9",+ "70": "#c49be3",+ "75": "#d0aaed",+ "80": "#ddb9f6",+ "85": "#eac8fd",+ "90": "#f2daff",+ "95": "#f8ecff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#180729",+ "10": "#270c3f",+ "15": "#351154",+ "20": "#441969",+ "25": "#52237b",+ "30": "#5f2e8a",+ "35": "#6c3a98",+ "40": "#7847a3",+ "45": "#8554b0",+ "50": "#9162bb",+ "55": "#9e70c5",+ "60": "#aa7ecf",+ "65": "#b68cd8",+ "70": "#c39ce3",+ "75": "#d0aaec",+ "80": "#ddb9f6",+ "85": "#e8c9fc",+ "90": "#f2daff",+ "95": "#f8ecff",+ "100": "#ffffff"+ }+ },+ "red": {+ "name": "Red",+ "light": {+ "0": "#000000",+ "5": "#2b0000",+ "10": "#3b0200",+ "15": "#4c0700",+ "20": "#5d0e00",+ "25": "#6f1400",+ "30": "#821b00",+ "35": "#952100",+ "40": "#a92800",+ "45": "#b93611",+ "50": "#c84422",+ "55": "#d75332",+ "60": "#e56241",+ "65": "#f37151",+ "70": "#ff8162",+ "75": "#ff9a80",+ "80": "#ffb09b",+ "85": "#ffc5b5",+ "90": "#ffd9cf",+ "95": "#ffece7",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#2a0000",+ "10": "#3b0200",+ "15": "#4c0700",+ "20": "#5d0e00",+ "25": "#6f1400",+ "30": "#801f03",+ "35": "#902a0f",+ "40": "#a0361b",+ "45": "#af4328",+ "50": "#be5035",+ "55": "#cc5d42",+ "60": "#da6c50",+ "65": "#e87a5f",+ "70": "#f4896f",+ "75": "#ff9a80",+ "80": "#ffb09b",+ "85": "#ffc5b5",+ "90": "#ffd9cf",+ "95": "#ffece7",+ "100": "#ffffff"+ }+ },+ "teal": {+ "name": "Teal",+ "light": {+ "0": "#000000",+ "5": "#001709",+ "10": "#002312",+ "15": "#002f1c",+ "20": "#003b24",+ "25": "#00482d",+ "30": "#005538",+ "35": "#006342",+ "40": "#00704c",+ "45": "#0c7d59",+ "50": "#208a65",+ "55": "#319672",+ "60": "#42a37f",+ "65": "#54b08e",+ "70": "#68bc9c",+ "75": "#7ec8ac",+ "80": "#94d3bb",+ "85": "#a2e1c9",+ "90": "#b0f0d7",+ "95": "#cffbe9",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001709",+ "10": "#002312",+ "15": "#002f1c",+ "20": "#003b24",+ "25": "#00482d",+ "30": "#045538",+ "35": "#106144",+ "40": "#1b6e4f",+ "45": "#277b5b",+ "50": "#328767",+ "55": "#3d9474",+ "60": "#4ba282",+ "65": "#5aae8f",+ "70": "#6cbb9e",+ "75": "#80c7ac",+ "80": "#94d3bb",+ "85": "#a2e1c9",+ "90": "#b0f0d7",+ "95": "#d1fbea",+ "100": "#ffffff"+ }+ },+ "yellow": {+ "name": "Butter Yellow",+ "light": {+ "0": "#000000",+ "5": "#161100",+ "10": "#211c00",+ "15": "#2c2600",+ "20": "#383100",+ "25": "#443c00",+ "30": "#514700",+ "35": "#5e5300",+ "40": "#6b5f00",+ "45": "#796b00",+ "50": "#877800",+ "55": "#958500",+ "60": "#a49200",+ "65": "#b19f1a",+ "70": "#bfae35",+ "75": "#cfbe48",+ "80": "#dfcf5b",+ "85": "#f0df72",+ "90": "#fdee8c",+ "95": "#fff7c0",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#161100",+ "10": "#211c00",+ "15": "#2c2600",+ "20": "#383100",+ "25": "#443c00",+ "30": "#514700",+ "35": "#5e5300",+ "40": "#6b5f00",+ "45": "#796b00",+ "50": "#877800",+ "55": "#958510",+ "60": "#a19229",+ "65": "#aea03e",+ "70": "#bcae4e",+ "75": "#cdbe59",+ "80": "#dfce65",+ "85": "#eedf75",+ "90": "#fdee8c",+ "95": "#fff7c2",+ "100": "#ffffff"+ }+ }+} as const;++export default palette;diff --git a/packages/themes/butter/src/butterPalettes.test.ts b/packages/themes/butter/src/butterPalettes.test.tsnew file mode 100644index 0000000000..e79205a4b4--- /dev/null+++ b/packages/themes/butter/src/butterPalettes.test.ts@@ -0,0 +1,66 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++import {describe, expect, it} from 'vitest';+import {palette as butterModePalettes} from './butterPalettes.generated';+import {butterPalettes} from './butterTheme';++const stops = [+ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,+ 100,+] as const;+const families = [+ 'neutral',+ 'accent',+ 'blue',+ 'cyan',+ 'green',+ 'orange',+ 'pink',+ 'purple',+ 'red',+ 'teal',+ 'yellow',+] as const;++const relativeLuminance = (hex: string): number => {+ const channels = hex+ .slice(1)+ .match(/.{2}/g)!+ .map(channel => Number.parseInt(channel, 16) / 255)+ .map(channel =>+ channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4,+ );+ return channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;+};++describe('butter palette artifact', () => {+ it('contains complete monotonic light and dark ramps', () => {+ expect(new Set(Object.keys(butterModePalettes))).toEqual(new Set(families));+ for (const familyName of families) {+ const family = butterModePalettes[familyName];+ for (const mode of ['light', 'dark'] as const) {+ const values = stops.map(stop => family[mode][stop]);+ expect(values.every(value => /^#[0-9a-f]{6}$/i.test(value))).toBe(true);+ expect(values[0]).toBe('#000000');+ expect(values.at(-1)).toBe('#ffffff');+ const luminance = values.map(relativeLuminance);+ expect(+ luminance.every(+ (value, index) => index === 0 || value > luminance[index - 1],+ ),+ ).toBe(true);+ }+ }+ });++ it('keeps Butter signature colors and warm surfaces exact', () => {+ expect(butterModePalettes.accent.light[40]).toBe('#225bff');+ expect(butterModePalettes.yellow.dark[90]).toBe('#fdee8c');+ expect(butterModePalettes.neutral.light[95]).toBe('#fdfbe4');+ expect(butterModePalettes.neutral.dark[10]).toBe('#261a13');+ });++ it('matches the complete released legacy object', () => {+ expect(butterPalettes).toMatchSnapshot();+ });+});diff --git a/packages/themes/butter/src/butterTheme.test.ts b/packages/themes/butter/src/butterTheme.test.tsindex 86854111ae..5529c84b11 100644--- a/packages/themes/butter/src/butterTheme.test.ts+++ b/packages/themes/butter/src/butterTheme.test.ts@@ -1,9 +1,45 @@// Copyright (c) Meta Platforms, Inc. and affiliates.+import {readFileSync} from 'node:fs';import {describe, expect, it} from 'vitest';import {generateThemeCSS} from '@astryxdesign/core/theme';+import {palette as butterModePalettes} from './butterPalettes.generated';import {butterTheme} from './butterTheme';+function linearize(channel: number): number {+ const value = channel / 255;+ return value <= 0.04045+ ? value / 12.92+ : Math.pow((value + 0.055) / 1.055, 2.4);+}++function luminance(color: string): number {+ const [red, green, blue] = [1, 3, 5].map(index =>+ Number.parseInt(color.slice(index, index + 2), 16),+ );+ return (+ 0.2126 * linearize(red) ++ 0.7152 * linearize(green) ++ 0.0722 * linearize(blue)+ );+}++function contrast(foreground: string, background: string): number {+ const [lighter, darker] = [luminance(foreground), luminance(background)].sort(+ (left, right) => right - left,+ );+ return (lighter + 0.05) / (darker + 0.05);+}++const source = readFileSync(+ new URL('./butterTheme.ts', import.meta.url),+ 'utf8',+);+const maintainedThemeSource = source.slice(+ 0,+ source.indexOf('/**\n * Frozen released compatibility palettes'),+);+describe('butter touch + narrow type pin', () => {it('floors body to 16px and holds Display 1 at its desktop size', () => {const rule = butterTheme.__adaptationRules?.[0];@@ -11,11 +47,9 @@ describe('butter touch + narrow type pin', () => {expect(butterTheme.__adaptations.rules).toHaveLength(1);expect(rule?.when).toEqual({pointer: 'coarse', width: {below: 'lg'}});expect(rule?.query).toBe('(width < 1024px) and (pointer: coarse)');- // Pinned ladder: base 16 (was 14), ratio 1.25 -> 1.2225, Display 1 pinned.expect(rule?.tokens['--font-size-base']).toBe('1rem');expect(rule?.tokens['--font-size-lg']).toBe('1.25rem');expect(rule?.tokens['--font-size-5xl']).toBe('3.3125rem');- // Desktop scale is untouched.expect(butterTheme.tokens['--font-size-base']).toBe('0.875rem');expect(butterTheme.tokens['--font-size-5xl']).toBe('3.3125rem');expect(generateThemeCSS(butterTheme).component).toContain(@@ -31,3 +65,88 @@ describe('butter secondary ComplexSelector', () => {);});});++describe('butter color token mapping completeness', () => {+ it('does not redefine the data-visualization color system', () => {+ expect(+ Object.keys(butterTheme.tokens).filter(name =>+ name.startsWith('--color-data-'),+ ),+ ).toEqual([]);+ });++ it('keeps every root color value concrete', () => {+ for (const [name, value] of Object.entries(butterTheme.tokens)) {+ if (!name.startsWith('--color-')) {+ continue;+ }+ expect(typeof value, name).toBe('string');+ expect(value, name).toMatch(+ /^(?:transparent|#[0-9a-f]{6}(?:[0-9a-f]{2})?|light-dark\(#[0-9a-f]{6}(?:[0-9a-f]{2})?, #[0-9a-f]{6}(?:[0-9a-f]{2})?\)|color-mix\(.+\)|var\(.+\))$/i,+ );+ }+ });++ it('uses no one-off color literals in the maintained theme source', () => {+ expect(maintainedThemeSource).not.toMatch(+ /#[0-9a-f]{3,8}\b|\brgba?\(|\bhsl[a]?\(|\boklch\(|\bblack\b|\bwhite\b/i,+ );+ });++ it('keeps maintained component text pairings at normal-text AA', () => {+ const {accent, neutral, red, yellow} = butterModePalettes;+ const pairs = [+ ['info status', neutral.light[15], accent.light[55]],+ ['error status', neutral.light[15], red.light[60]],+ ['neutral badge', accent.light[35], yellow.light[90]],+ ['light top nav', accent.light[40], neutral.light[95]],+ ['selected light top nav', accent.light[35], neutral.light[95]],+ ] as const;++ for (const [name, foreground, background] of pairs) {+ expect(contrast(foreground, background), name).toBeGreaterThanOrEqual(+ 4.5,+ );+ }++ expect(butterTheme.components?.badge).toMatchObject({+ 'variant:info': {+ backgroundColor: accent.light[55],+ color: neutral.light[15],+ },+ 'variant:neutral': {+ backgroundColor: yellow.light[90],+ color: accent.light[35],+ },+ 'variant:error': {+ backgroundColor: red.light[60],+ color: neutral.light[15],+ },+ });+ expect(butterTheme.components?.banner).toMatchObject({+ 'status:info': {+ '--color-accent-muted': accent.light[55],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-accent': neutral.light[15],+ },+ 'status:error': {+ '--color-error-muted': red.light[60],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-error': neutral.light[15],+ },+ });+ expect(+ butterTheme.components?.['field-status']?.['type:error'],+ ).toMatchObject({backgroundColor: red.light[60], color: neutral.light[15]});+ expect(butterTheme.components?.['top-nav-item']).toMatchObject({+ base: {+ color: `light-dark(${accent.light[40]}, ${yellow.dark[90]}cc)`,+ },+ selected: {+ color: `light-dark(${accent.light[35]}, ${yellow.dark[90]})`,+ },+ });+ });+});diff --git a/packages/themes/butter/src/butterTheme.ts b/packages/themes/butter/src/butterTheme.tsindex 1d91ea5f54..6019ed7469 100644--- a/packages/themes/butter/src/butterTheme.ts+++ b/packages/themes/butter/src/butterTheme.ts@@ -6,40 +6,50 @@* Warm, golden buttery theme with blue accents.* Sarina for display, Outfit for headings and body.*- * Source palette (per design):- * Accent #225BFF Gray #868B99 Red #FF7553- * Orange #FFA347 Yellow #fdee8c Green #5DCE5F- * Cyan #60CFD3 Teal #6CD9A8 Blue #5681FF- * Purple #B780F6 Pink #F680E8 Error #FF5947- * Warning #F8C726 Success #91D143- *- * All tonal ramps derived in CIELab (matches the algorithm used by- * ThemePalettePreview so card / badge / banner / strip render the- * same values). Regen via scripts/butter-palette-gen.mjs if sources- * change.+ * All colors resolve through named stops from Butter's reviewed palette.+ * The signature blue and butter yellow remain exact anchors.*/import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';import {butterIconRegistry} from './icons';--/** Butter syntax palette — T25 / T80 of each color's ramp. */+import {butterPaletteRefs} from './butterPaletteRefs.generated';++const {+ accent,+ blue,+ cyan,+ green,+ neutral,+ orange,+ pink,+ purple,+ red,+ teal,+ yellow,+} = butterPaletteRefs;++const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;+const lightDark = (light: string, dark: string): string =>+ `light-dark(${light}, ${dark})`;++/** Butter syntax colors resolved through reviewed palette stops. */const butterSyntax = defineSyntaxTheme({name: 'astryx-butter',tokens: {- keyword: ['#52237b', '#ddb9f6'], // Purple- string: ['#004800', '#a5d29d'], // Green- comment: ['#605f52', '#adac9e'],- number: ['#622e00', '#f2bd81'], // Orange- function: ['#203a6c', '#bdc5eb'], // Blue- type: ['#52237b', '#ddb9f6'], // Purple- variable: ['#605f52', '#adac9e'],- operator: ['#605f52', '#adac9e'],- constant: ['#622e00', '#f2bd81'],- tag: ['#6d211c', '#f4b8ae'], // Red- attribute: ['#413e00', '#d6c957'], // Yellow- property: ['#00482d', '#94d3bb'], // Teal- punctuation: ['#605f52', '#adac9e'],- background: ['#FDFBE4', '#131107'],+ keyword: [purple.light[25], purple.dark[80]], // Purple+ string: [green.light[25], green.dark[80]], // Green+ comment: [neutral.light[45], neutral.dark[70]],+ number: [orange.light[25], orange.dark[80]], // Orange+ function: [blue.light[25], blue.dark[80]], // Blue+ type: [purple.light[25], purple.dark[80]], // Purple+ variable: [neutral.light[45], neutral.dark[70]],+ operator: [neutral.light[45], neutral.dark[70]],+ constant: [orange.light[25], orange.dark[80]],+ tag: [red.light[25], red.dark[80]], // Red+ attribute: [yellow.light[25], yellow.dark[70]], // Yellow+ property: [teal.light[25], teal.dark[80]], // Teal+ punctuation: [neutral.light[45], neutral.dark[70]],+ background: [neutral.light[95], neutral.dark[5]],},});@@ -54,10 +64,13 @@ const SECONDARY_BUTTON = {backgroundColor: 'transparent',borderWidth: '1.5px',borderStyle: 'solid',- borderColor: 'light-dark(#225BFF, #FDEE8C)',- color: 'light-dark(#225BFF, #FDEE8C)',+ borderColor: lightDark(accent.light[40], yellow.dark[90]),+ color: lightDark(accent.light[40], yellow.dark[90]),':hover': {- backgroundColor: 'light-dark(#225BFF14, #FDEE8C14)',+ backgroundColor: lightDark(+ withAlpha(accent.light[40], '14'),+ withAlpha(yellow.dark[90], '14'),+ ),},} as const;@@ -134,58 +147,85 @@ export const butterTheme = defineTheme({tokens: {// =========================================================================- // Core semantic — accent is the exact brand #225BFF+ // Core semantic — accent uses the exact signature brand stop// =========================================================================- '--color-accent': ['#225BFF', '#FDEE8C'],- '--color-accent-muted': ['#225BFF33', '#FDEE8C40'],- '--color-neutral': ['#1d1c110F', '#f3f2e21A'],- '--color-background-surface': ['#FFFFFF', '#2E2117'],- '--color-background-body': ['#FDFBE4', '#261A13'],- '--color-overlay': ['#1d1c1180', '#261A13cc'],- '--color-overlay-hover': ['#1d1c110D', '#f3f2e20D'],- '--color-overlay-pressed': ['#1d1c111A', '#f3f2e21A'],- '--color-background-muted': ['#f3f2e2', '#3A2A1F'],+ '--color-accent': [accent.light[40], yellow.dark[90]],+ '--color-accent-muted': [+ withAlpha(accent.light[40], '33'),+ withAlpha(yellow.dark[90], '40'),+ ],+ '--color-neutral': [+ withAlpha(neutral.light[15], '0f'),+ withAlpha(neutral.dark[90], '1a'),+ ],+ '--color-background-surface': [neutral.light[100], neutral.dark[15]],+ '--color-background-body': [neutral.light[95], neutral.dark[10]],+ '--color-overlay': [+ withAlpha(neutral.light[15], '80'),+ withAlpha(neutral.dark[10], 'cc'),+ ],+ '--color-overlay-hover': [+ withAlpha(neutral.light[15], '0d'),+ withAlpha(neutral.dark[90], '0d'),+ ],+ '--color-overlay-pressed': [+ withAlpha(neutral.light[15], '1a'),+ withAlpha(neutral.dark[90], '1a'),+ ],+ '--color-background-muted': [neutral.light[90], neutral.dark[20]],// Text — warm neutral- '--color-text-primary': ['#1d1c11', '#f3f2e2'],- '--color-text-secondary': ['#605f52', '#adac9e'],- '--color-text-disabled': ['#adac9e', '#605f52'],- '--color-text-accent': ['#225BFF', '#FDEE8C'],- '--color-on-dark': '#ffffff',- '--color-on-light': '#1d1c11',- '--color-on-accent': ['#ffffff', '#1d1c11'],- // T95 of each ramp for use on the vivid semantic surfaces.- '--color-on-success': ['#ccff88', '#0b2e00'],- '--color-on-error': ['#ffe3de', '#600000'],- '--color-on-warning': ['#ffeec3', '#3b2200'],+ '--color-text-primary': [neutral.light[15], neutral.dark[90]],+ '--color-text-secondary': [neutral.light[45], neutral.dark[70]],+ '--color-text-disabled': [neutral.light[70], neutral.dark[45]],+ '--color-text-accent': [accent.light[40], yellow.dark[90]],+ '--color-on-dark': neutral.light[100],+ '--color-on-light': neutral.light[15],+ '--color-on-accent': [neutral.light[100], neutral.light[15]],+ // Light foregrounds used on vivid semantic surfaces.+ '--color-on-success': [green.light[85], green.dark[15]],+ '--color-on-error': [red.light[95], red.dark[15]],+ '--color-on-warning': [yellow.light[95], yellow.dark[15]],// Icon- '--color-icon-accent': ['#225BFF', '#FDEE8C'],- '--color-icon-primary': ['#1d1c11', '#f3f2e2'],- '--color-icon-secondary': ['#605f52', '#adac9e'],- '--color-icon-disabled': ['#adac9e', '#605f52'],+ '--color-icon-accent': [accent.light[40], yellow.dark[90]],+ '--color-icon-primary': [neutral.light[15], neutral.dark[90]],+ '--color-icon-secondary': [neutral.light[45], neutral.dark[70]],+ '--color-icon-disabled': [neutral.light[70], neutral.dark[45]],// Surface variants- '--color-background-card': ['#FFFFFF', '#3A2A1F'],- '--color-background-popover': ['#FFFFFF', '#3A2A1F'],- '--color-background-inverted': ['#1d1c11', '#FDFBE4'],-- // Status semantics — T25 light / T80 dark from each status palette.- '--color-error': ['#771210', '#ffb4a6'],- '--color-error-muted': ['#77121033', '#ffb4a640'],- '--color-warning': ['#543700', '#f7be00'],- '--color-warning-muted': ['#54370033', '#f7be0040'],- '--color-success': ['#004700', '#99d94b'],- '--color-success-muted': ['#00470033', '#99d94b40'],+ '--color-background-card': [neutral.light[100], neutral.dark[20]],+ '--color-background-popover': [neutral.light[100], neutral.dark[20]],+ '--color-background-inverted': [neutral.light[15], neutral.dark[95]],++ // Status semantics share the Red, Yellow, and Green families.+ '--color-error': [red.light[30], red.dark[85]],+ '--color-error-muted': [+ withAlpha(red.light[30], '33'),+ withAlpha(red.dark[85], '40'),+ ],+ '--color-warning': [yellow.light[30], yellow.dark[75]],+ '--color-warning-muted': [+ withAlpha(yellow.light[30], '33'),+ withAlpha(yellow.dark[75], '40'),+ ],+ '--color-success': [green.light[25], green.dark[70]],+ '--color-success-muted': [+ withAlpha(green.light[25], '33'),+ withAlpha(green.dark[70], '40'),+ ],// Border — softer taupe card outline (emphasized) in light mode.- '--color-border': ['#e5e3d4', '#f3f2e21A'],- '--color-border-emphasized': ['#C7C4B2', '#939184'],+ '--color-border': [neutral.light[85], withAlpha(neutral.dark[90], '1a')],+ '--color-border-emphasized': [neutral.light[75], neutral.dark[60]],// Effects- '--color-skeleton': ['#e5e3d4', '#49473b'],- '--color-shadow': ['#1d1c111A', '#0000004D'],- '--color-tint-hover': ['black', 'white'],+ '--color-skeleton': [neutral.light[85], neutral.dark[35]],+ '--color-shadow': [+ withAlpha(neutral.light[15], '1a'),+ withAlpha(neutral.dark[0], '4d'),+ ],+ '--color-tint-hover': [neutral.light[0], neutral.dark[100]],// Typography override'--text-supporting-size': '12px',@@ -197,69 +237,68 @@ export const butterTheme = defineTheme({'--size-element-lg': '48px',// =========================================================================- // Categorical — same values in light and dark mode (curated dark mode- // keeps the same pastel backgrounds + dark text as light mode).+ // Categorical — reviewed light and dark stops for each family.// =========================================================================// Blue- '--color-background-blue': ['#dbe1ff', '#dbe1ff'],- '--color-border-blue': ['#bdc5eb', '#bdc5eb'],- '--color-icon-blue': ['#203a6c', '#203a6c'],- '--color-text-blue': ['#203a6c', '#203a6c'],+ '--color-background-blue': [blue.light[90], blue.dark[90]],+ '--color-border-blue': [blue.light[80], blue.dark[80]],+ '--color-icon-blue': [blue.light[25], blue.dark[25]],+ '--color-text-blue': [blue.light[25], blue.dark[25]],// Cyan- '--color-background-cyan': ['#a9eff0', '#a9eff0'],- '--color-border-cyan': ['#8dd2d3', '#8dd2d3'],- '--color-icon-cyan': ['#004649', '#004649'],- '--color-text-cyan': ['#004649', '#004649'],+ '--color-background-cyan': [cyan.light[90], cyan.dark[90]],+ '--color-border-cyan': [cyan.light[80], cyan.dark[80]],+ '--color-icon-cyan': [cyan.light[25], cyan.dark[25]],+ '--color-text-cyan': [cyan.light[25], cyan.dark[25]],// Gray (uses the neutral palette)- '--color-background-gray': ['#f0edd4', '#f0edd4'],- '--color-border-gray': ['#d6d3b8', '#d6d3b8'],- '--color-icon-gray': ['#4a4732', '#4a4732'],- '--color-text-gray': ['#4a4732', '#4a4732'],+ '--color-background-gray': [neutral.dark[85], neutral.dark[85]],+ '--color-border-gray': [neutral.light[80], neutral.dark[80]],+ '--color-icon-gray': [neutral.light[30], neutral.dark[30]],+ '--color-text-gray': [neutral.light[30], neutral.dark[30]],// Green- '--color-background-green': ['#c1efb8', '#c1efb8'],- '--color-border-green': ['#a5d29d', '#a5d29d'],- '--color-icon-green': ['#004800', '#004800'],- '--color-text-green': ['#004800', '#004800'],+ '--color-background-green': [green.light[90], green.dark[90]],+ '--color-border-green': [green.light[80], green.dark[80]],+ '--color-icon-green': [green.light[25], green.dark[20]],+ '--color-text-green': [green.light[25], green.dark[20]],// Orange- '--color-background-orange': ['#ffdcb6', '#ffdcb6'],- '--color-border-orange': ['#f2bd81', '#f2bd81'],- '--color-icon-orange': ['#622e00', '#622e00'],- '--color-text-orange': ['#622e00', '#622e00'],+ '--color-background-orange': [orange.light[90], orange.dark[90]],+ '--color-border-orange': [orange.light[80], orange.dark[80]],+ '--color-icon-orange': [orange.light[25], orange.dark[25]],+ '--color-text-orange': [orange.light[25], orange.dark[25]],// Pink- '--color-background-pink': ['#ffd5fb', '#ffd5fb'],- '--color-border-pink': ['#f0b3e8', '#f0b3e8'],- '--color-icon-pink': ['#6c0a68', '#6c0a68'],- '--color-text-pink': ['#6c0a68', '#6c0a68'],+ '--color-background-pink': [pink.light[90], pink.dark[90]],+ '--color-border-pink': [pink.light[80], pink.dark[80]],+ '--color-icon-pink': [pink.light[25], pink.dark[25]],+ '--color-text-pink': [pink.light[25], pink.dark[25]],// Purple- '--color-background-purple': ['#f2daff', '#f2daff'],- '--color-border-purple': ['#ddb9f6', '#ddb9f6'],- '--color-icon-purple': ['#52237b', '#52237b'],- '--color-text-purple': ['#52237b', '#52237b'],+ '--color-background-purple': [purple.light[90], purple.dark[90]],+ '--color-border-purple': [purple.light[80], purple.dark[80]],+ '--color-icon-purple': [purple.light[25], purple.dark[25]],+ '--color-text-purple': [purple.light[25], purple.dark[25]],// Red- '--color-background-red': ['#ffdad3', '#ffdad3'],- '--color-border-red': ['#f4b8ae', '#f4b8ae'],- '--color-icon-red': ['#6d211c', '#6d211c'],- '--color-text-red': ['#6d211c', '#6d211c'],+ '--color-background-red': [red.light[90], red.dark[90]],+ '--color-border-red': [red.light[80], red.dark[80]],+ '--color-icon-red': [red.light[25], red.dark[25]],+ '--color-text-red': [red.light[25], red.dark[25]],// Teal- '--color-background-teal': ['#b0f0d7', '#b0f0d7'],- '--color-border-teal': ['#94d3bb', '#94d3bb'],- '--color-icon-teal': ['#00482d', '#00482d'],- '--color-text-teal': ['#00482d', '#00482d'],+ '--color-background-teal': [teal.light[90], teal.dark[90]],+ '--color-border-teal': [teal.light[80], teal.dark[80]],+ '--color-icon-teal': [teal.light[25], teal.dark[25]],+ '--color-text-teal': [teal.light[25], teal.dark[25]],// Yellow- '--color-background-yellow': ['#feee7b', '#feee7b'],- '--color-border-yellow': ['#d6c957', '#d6c957'],- '--color-icon-yellow': ['#413e00', '#413e00'],- '--color-text-yellow': ['#413e00', '#413e00'],+ '--color-background-yellow': [yellow.light[85], yellow.dark[85]],+ '--color-border-yellow': [yellow.light[70], yellow.dark[70]],+ '--color-icon-yellow': [yellow.light[25], yellow.dark[25]],+ '--color-text-yellow': [yellow.light[25], yellow.dark[25]],// =========================================================================// Radius@@ -279,14 +318,14 @@ export const butterTheme = defineTheme({// =========================================================================// Shadows — warm neutral tint// =========================================================================- '--shadow-low': '0 2px 4px #1d1c110D, 0 4px 8px #1d1c111A',- '--shadow-med': '0 2px 4px #1d1c110D, 0 4px 12px #1d1c111A',- '--shadow-high': '0 4px 6px #1d1c111A, 0 12px 24px #1d1c1126',- '--shadow-inset-hover': 'inset 0px 0px 0px 2px #79786a30',- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #79786a50',- '--shadow-inset-success': 'inset 0px 0px 0px 2px #00470030',- '--shadow-inset-warning': 'inset 0px 0px 0px 2px #54370030',- '--shadow-inset-error': 'inset 0px 0px 0px 2px #77121030',+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.light[15], '0d')}, 0 4px 8px ${withAlpha(neutral.light[15], '1a')}`,+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.light[15], '0d')}, 0 4px 12px ${withAlpha(neutral.light[15], '1a')}`,+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.light[15], '1a')}, 0 12px 24px ${withAlpha(neutral.light[15], '26')}`,+ '--shadow-inset-hover': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[55], '30')}`,+ '--shadow-inset-selected': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[55], '50')}`,+ '--shadow-inset-success': `inset 0px 0px 0px 2px ${withAlpha(green.light[25], '30')}`,+ '--shadow-inset-warning': `inset 0px 0px 0px 2px ${withAlpha(yellow.light[30], '30')}`,+ '--shadow-inset-error': `inset 0px 0px 0px 2px ${withAlpha(red.light[30], '30')}`,},components: {@@ -298,18 +337,18 @@ export const butterTheme = defineTheme({// redirect that token (not just `color`) to the brand blue so the text// itself turns blue, not only the container.base: {- color: 'light-dark(#225BFF, #FDEE8C)',- '--color-text-primary': 'light-dark(#225BFF, #FDEE8C)',+ color: lightDark(accent.light[40], yellow.dark[90]),+ '--color-text-primary': lightDark(accent.light[40], yellow.dark[90]),},},'top-nav-item': {base: {- color: 'light-dark(#6E92FF, #FDEE8CCC)',+ color: lightDark(accent.light[40], withAlpha(yellow.dark[90], 'cc')),},- // Selected item: full brand blue, no pill background — rely on weight +- // color for emphasis. Hover/active keep the neutral overlay.+ // Selected item: a darker Blue stop in light mode and full Butter Yellow+ // in dark mode, with no pill background. Weight + color carry emphasis.selected: {- color: 'light-dark(#225BFF, #FDEE8C)',+ color: lightDark(accent.light[35], yellow.dark[90]),backgroundColor: 'transparent',':hover': {backgroundColor: 'var(--color-overlay-hover)',@@ -330,11 +369,11 @@ export const butterTheme = defineTheme({'variant:secondary': SECONDARY_BUTTON,// Ghost: same accent color as secondary, no background.'variant:ghost': {- color: 'light-dark(#225BFF, #FDEE8C)',+ color: lightDark(accent.light[40], yellow.dark[90]),},'variant:destructive': {- backgroundColor: 'light-dark(#ffdad3, #f4b8ae)',- color: 'light-dark(#550000, #6d211c)',+ backgroundColor: lightDark(red.light[90], red.dark[80]),+ color: lightDark(red.light[10], red.dark[25]),},},@@ -347,27 +386,27 @@ export const butterTheme = defineTheme({paddingBlock: '0',paddingInline: 'var(--spacing-3)',},- // Vivid semantic badges — pinned to the brand colors from the spec.- // Info uses the Blue palette source (NOT the brand accent #225BFF).+ // Vivid semantic badges — pinned to the reviewed semantic stops.+ // Info uses Butter’s lighter accent stop rather than its signature stop.'variant:info': {- backgroundColor: '#4883fd',- color: '#ffffff',+ backgroundColor: accent.light[55],+ color: neutral.light[15],},'variant:neutral': {- backgroundColor: '#ffee7b',- color: '#225BFF',+ backgroundColor: yellow.light[90],+ color: accent.light[35],},'variant:success': {- backgroundColor: '#91D143',- color: '#1d1c11',+ backgroundColor: green.light[70],+ color: neutral.light[15],},'variant:warning': {- backgroundColor: '#ffc502',- color: '#1d1c11',+ backgroundColor: yellow.light[80],+ color: neutral.light[15],},'variant:error': {- backgroundColor: '#fc473b',- color: '#ffffff',+ backgroundColor: red.light[60],+ color: neutral.light[15],},},@@ -377,28 +416,28 @@ export const butterTheme = defineTheme({// matching the badge palette. Scoped to the banner root, doesn't leak.banner: {'status:info': {- '--color-accent-muted': '#4883fd',- '--color-text-primary': '#ffffff',- '--color-text-secondary': '#ffffff',- '--color-accent': '#ffffff',+ '--color-accent-muted': accent.light[55],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-accent': neutral.light[15],},'status:success': {- '--color-success-muted': '#91D143',- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#1d1c11',- '--color-success': '#1d1c11',+ '--color-success-muted': green.light[70],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-success': neutral.light[15],},'status:warning': {- '--color-warning-muted': '#ffc502',- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#1d1c11',- '--color-warning': '#1d1c11',+ '--color-warning-muted': yellow.light[80],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-warning': neutral.light[15],},'status:error': {- '--color-error-muted': '#fc473b',- '--color-text-primary': '#ffffff',- '--color-text-secondary': '#ffffff',- '--color-error': '#ffffff',+ '--color-error-muted': red.light[60],+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[15],+ '--color-error': neutral.light[15],},},@@ -408,64 +447,64 @@ export const butterTheme = defineTheme({padding: 'var(--spacing-4)',},'variant:info': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:success': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:warning': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:error': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:blue': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:cyan': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:gray': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:green': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:orange': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:pink': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:purple': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:red': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:teal': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:yellow': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},'variant:muted': {- '--color-text-primary': '#1d1c11',- '--color-text-secondary': '#605f52',+ '--color-text-primary': neutral.light[15],+ '--color-text-secondary': neutral.light[45],},},@@ -475,22 +514,22 @@ export const butterTheme = defineTheme({},},- // Progress bar — white track in light, warm brown in dark. Vivid+ // Progress bar — pale track in light, warm brown in dark. Vivid// semantic fills match the banner colors (Success / Warning / Error).'progress-bar-track': {base: {- backgroundColor: 'light-dark(#e5e3d4, #725538)',+ backgroundColor: lightDark(neutral.light[85], neutral.dark[40]),},},'progress-bar-fill': {'variant:success': {- backgroundColor: '#91D143',+ backgroundColor: green.light[70],},'variant:warning': {- backgroundColor: '#ffc502',+ backgroundColor: yellow.light[80],},'variant:error': {- backgroundColor: '#fc473b',+ backgroundColor: red.light[60],},},@@ -499,16 +538,16 @@ export const butterTheme = defineTheme({// error / success" surface as the standalone banner.'field-status': {'type:success': {- backgroundColor: '#91D143',- color: '#1d1c11',+ backgroundColor: green.light[70],+ color: neutral.light[15],},'type:warning': {- backgroundColor: '#ffc502',- color: '#1d1c11',+ backgroundColor: yellow.light[80],+ color: neutral.light[15],},'type:error': {- backgroundColor: '#fc473b',- color: '#ffffff',+ backgroundColor: red.light[60],+ color: neutral.light[15],},},@@ -522,9 +561,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'text-area': {base: {@@ -532,9 +571,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'number-input': {base: {@@ -542,9 +581,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'date-input': {base: {@@ -552,9 +591,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},'time-input': {base: {@@ -562,9 +601,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},selector: {base: {@@ -572,9 +611,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},'variant:secondary': SECONDARY_SELECTOR,},'multi-selector': {@@ -583,9 +622,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},'variant:secondary': SECONDARY_SELECTOR,},'complex-selector': {'variant:secondary': SECONDARY_COMPLEX_SELECTOR},@@ -595,9 +634,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},tokenizer: {base: {@@ -605,9 +644,9 @@ export const butterTheme = defineTheme({paddingInline: 'var(--spacing-3)',borderColor: 'var(--color-border)',},- 'status:success': {'--color-success': '#91D143'},- 'status:warning': {'--color-warning': '#ffc502'},- 'status:error': {'--color-error': '#fc473b'},+ 'status:success': {'--color-success': green.light[70]},+ 'status:warning': {'--color-warning': yellow.light[80]},+ 'status:error': {'--color-error': red.light[60]},},// Display sizes use Sarina — the signature buttery display@@ -632,22 +671,23 @@ export const butterTheme = defineTheme({});/**- * Raw tonal palettes — generated from design-spec source hexes via the- * same CIELab algorithm `ThemePalettePreview` uses for the displayed- * strip, so the rendered ramp and the consumed token values are 1:1.+ * Frozen released compatibility palettes. These ramps preserve the public+ * `butterPalettes` shape and values for existing consumers; the maintained+ * theme renders selected stops from `butterPalettes.generated.ts` instead.+ * Do not regenerate this object from the private mode-aware palette.*- * Source colors:+ * Historical source labels for this compatibility snapshot:* accent #225BFF neutral #868B99* red #ffc3b8 orange #ffc98d yellow #feee7b* green #bdebb4 cyan #abf1f1 teal #aeefd6* blue #cdd5fc purple #e6c2ff pink #fec0f5* error #fc473b warning #ffc502 success #91D143*- * Categorical sources are the pastel pill hexes from the design spec so- * each ramp's T85 lands directly on the card / badge background color.- * Semantic sources are vivid so the ramp anchors near the badge fill.+ * The original snapshot used pastel categorical source labels and vivid semantic+ * source labels. The current maintained theme does not derive from this object.*- * Regenerate with: node packages/themes/butter/scripts/generate-palettes.mjs+ * These notes describe the released snapshot and are not regeneration+ * instructions for the maintained theme.*/export const butterPalettes = {blue: {diff --git a/packages/themes/butter/src/source.ts b/packages/themes/butter/src/source.tsindex e6e048da6f..ab16d5e0e4 100644--- a/packages/themes/butter/src/source.ts+++ b/packages/themes/butter/src/source.ts@@ -1,4 +1,4 @@// Copyright (c) Meta Platforms, Inc. and affiliates.-export {butterTheme, butterPalettes} from './butterTheme';+export {butterPalettes, butterTheme} from './butterTheme';export {butterIconRegistry} from './icons';diff --git a/scripts/check-badge-contrast.test.mjs b/scripts/check-badge-contrast.test.mjsindex 4fc913f306..d41b2f91cd 100644--- a/scripts/check-badge-contrast.test.mjs+++ b/scripts/check-badge-contrast.test.mjs@@ -188,19 +188,10 @@ const THEMES_WITH_BADGE_BLOCK = ['butter', 'gothic', 'neutral', 'stone', 'y2k'];/*** Pre-existing shortfalls this guard records rather than silently tolerates.- *- * Butter pins these fills to brand values, so moving them is a design call,- * not a bug fix. The guard asserts the set matches exactly, so a new shortfall- * fails the build and a fixed one fails until it is deleted from this list.+ * The set is exact: a new shortfall fails the build, and a fixed one fails until+ * it is deleted from this list.*/-const KNOWN_GAPS = [- 'butter/dark variant:error',- 'butter/dark variant:info',- 'butter/dark variant:neutral',- 'butter/light variant:error',- 'butter/light variant:info',- 'butter/light variant:neutral',-];+const KNOWN_GAPS = [];describe('Badge label contrast', () => {const rows = badgePairs();diff --git a/scripts/generate-butter-palette-refs.mjs b/scripts/generate-butter-palette-refs.mjsnew file mode 100644index 0000000000..8ec4f2378b--- /dev/null+++ b/scripts/generate-butter-palette-refs.mjs@@ -0,0 +1,70 @@+#!/usr/bin/env node+// Copyright (c) Meta Platforms, Inc. and affiliates.+/* global process */++import * as path from 'node:path';+import {fileURLToPath, pathToFileURL} from 'node:url';+import {+ countSelectedRefs,+ createSelectedPaletteRefGenerator,+} from './generate-selected-palette-refs.mjs';++const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');++export const THEME_SOURCE_REL = 'packages/themes/butter/src/butterTheme.ts';+export const FULL_PALETTE_REL =+ 'packages/themes/butter/src/butterPalettes.generated.ts';+export const SELECTED_REFS_REL =+ 'packages/themes/butter/src/butterPaletteRefs.generated.ts';+export const TEMPLATE_REFS_REL =+ 'packages/cli/assets/templates/themes/butter/butterPaletteRefs.generated.ts';++const generator = createSelectedPaletteRefGenerator({+ themeDisplayName: 'Butter',+ paletteRefsIdentifier: 'butterPaletteRefs',+ themeSourceRel: THEME_SOURCE_REL,+ fullPaletteRel: FULL_PALETTE_REL,+ selectedRefsRel: SELECTED_REFS_REL,+ templateRefsRel: TEMPLATE_REFS_REL,+ regenerateCommand: 'pnpm generate:butter-palette-refs',+});++export function generateButterPaletteRefs({root = ROOT, check = false} = {}) {+ return generator.generateSelectedPaletteRefs({root, check});+}++function main() {+ const check = process.argv.includes('--check');+ const result = generateButterPaletteRefs({check});+ const count = countSelectedRefs(result.selected);++ if (check && result.problems.length > 0) {+ process.stderr.write(+ `\nButter selected palette refs are out of sync:\n` ++ result.problems+ .map(+ problem =>+ ` - ${path.relative(ROOT, problem.output)} ${problem.reason}`,+ )+ .join('\n') ++ `\nRun: pnpm generate:butter-palette-refs\n\n`,+ );+ return 1;+ }++ if (check) {+ process.stdout.write(+ `Butter selected palette refs are in sync (${count} stops).\n`,+ );+ } else {+ for (const output of result.outputs) {+ process.stdout.write(`Wrote ${path.relative(ROOT, output)}\n`);+ }+ process.stdout.write(`Selected ${count} referenced palette stops.\n`);+ }+ return 0;+}++if (import.meta.url === pathToFileURL(process.argv[1] || '').href) {+ process.exit(main());+}diff --git a/scripts/generate-butter-palette-refs.test.mjs b/scripts/generate-butter-palette-refs.test.mjsnew file mode 100644index 0000000000..daa17c268c--- /dev/null+++ b/scripts/generate-butter-palette-refs.test.mjs@@ -0,0 +1,152 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++/**+ * @file Focused tests for Butter's selected palette-reference wrapper.+ * @input Synthetic Butter theme references and full-palette literals.+ * @output Proof that Butter binds the shared generator to both required outputs.+ * @position Regression coverage for generate-butter-palette-refs.mjs.+ */++import * as fs from 'node:fs';+import * as os from 'node:os';+import * as path from 'node:path';+import {fileURLToPath} from 'node:url';+import {describe, expect, it} from 'vitest';+import {themePaletteGenerate} from '../packages/cli/api/theme/palette/generate/generate.mjs';+import {assertPaletteReceiptsMatch} from './palette-receipt-test-utils.mjs';+import {countSelectedRefs} from './generate-selected-palette-refs.mjs';+import {+ FULL_PALETTE_REL,+ SELECTED_REFS_REL,+ TEMPLATE_REFS_REL,+ THEME_SOURCE_REL,+ generateButterPaletteRefs,+} from './generate-butter-palette-refs.mjs';++const FULL_PALETTE = `export const palette = {+ blue: {+ name: 'Blue',+ dark: {25: '#778899', 80: '#aabbcc'},+ },+ neutral: {+ name: 'Butter Neutral',+ dark: {5: '#111111'},+ },+} as const;+`;++const THEME_SOURCE = `+const {blue: butterBlue, neutral} = butterPaletteRefs;+export const butterTheme = {+ first: butterBlue.dark[80],+ direct: butterPaletteRefs.blue.dark[25],+ repeated: butterBlue.dark[80],+ surface: neutral.dark[5],+};+`;++describe('Butter selected palette ref generation', () => {+ it('reproduces the committed full palette and receipt from its config', () => {+ const root = path.resolve(+ path.dirname(fileURLToPath(import.meta.url)),+ '..',+ );+ const temp = fs.mkdtempSync(+ path.join(os.tmpdir(), 'astryx-butter-palette-'),+ );+ try {+ fs.copyFileSync(+ path.join(root, 'packages/themes/butter/palette.config.json'),+ path.join(temp, 'palette.config.json'),+ );+ themePaletteGenerate(+ 'palette.config.json',+ {+ out: 'butterPalettes.generated.ts',+ preview: 'butter-palette-preview.html',+ },+ {cwd: temp},+ );++ const generated = fs.readFileSync(+ path.join(temp, 'butterPalettes.generated.ts'),+ 'utf8',+ );+ const committed = fs+ .readFileSync(+ path.join(+ root,+ 'packages/themes/butter/src/butterPalettes.generated.ts',+ ),+ 'utf8',+ )+ .replace(+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n',+ '',+ );+ expect(generated).toBe(committed);+ assertPaletteReceiptsMatch(+ JSON.parse(+ fs.readFileSync(+ path.join(temp, 'butterPalettes.generated.receipt.json'),+ 'utf8',+ ),+ ),+ JSON.parse(+ fs.readFileSync(+ path.join(+ root,+ 'packages/themes/butter/src/butterPalettes.generated.receipt.json',+ ),+ 'utf8',+ ),+ ),+ );+ } finally {+ fs.rmSync(temp, {recursive: true, force: true});+ }+ });++ it('generates the package artifact and CLI template through the shared path', () => {+ const root = fs.mkdtempSync(path.join(os.tmpdir(), 'astryx-butter-refs-'));+ try {+ const themeSource = path.join(root, THEME_SOURCE_REL);+ const fullPalette = path.join(root, FULL_PALETTE_REL);+ fs.mkdirSync(path.dirname(themeSource), {recursive: true});+ fs.writeFileSync(themeSource, THEME_SOURCE);+ fs.writeFileSync(fullPalette, FULL_PALETTE);++ const generated = generateButterPaletteRefs({root});++ expect(countSelectedRefs(generated.selected)).toBe(3);+ expect(generated.outputs).toEqual([+ path.join(root, SELECTED_REFS_REL),+ path.join(root, TEMPLATE_REFS_REL),+ ]);+ expect(generated.content).toContain(+ "// Generated from the committed full palette for the stops used by Butter's",+ );+ expect(generated.content).toContain(+ '// theme source. Regenerate with `pnpm generate:butter-palette-refs`.',+ );+ expect(generated.content).toContain('export const butterPaletteRefs = {');+ expect(generated.content).toContain(+ "dark: {25: '#778899', 80: '#aabbcc'}",+ );+ expect(generated.content).toContain('export default butterPaletteRefs;');+ for (const output of generated.outputs) {+ expect(fs.readFileSync(output, 'utf-8')).toBe(generated.content);+ }++ expect(generateButterPaletteRefs({root, check: true}).problems).toEqual(+ [],+ );+ fs.appendFileSync(path.join(root, TEMPLATE_REFS_REL), '// stale\n');+ expect(generateButterPaletteRefs({root, check: true}).problems).toEqual([+ {output: path.join(root, TEMPLATE_REFS_REL), reason: 'differs'},+ ]);+ } finally {+ fs.rmSync(root, {recursive: true, force: true});+ }+ });+});