An open source design system that's fully customizable and agent ready
TypeScript
Adopt reviewed Matcha palette (#7671)
rubyycheung28b1cd457730
diff --git a/.changeset/matcha-reviewed-palette.md b/.changeset/matcha-reviewed-palette.mdnew file mode 100644index 0000000000..d89f6878fa--- /dev/null+++ b/.changeset/matcha-reviewed-palette.md@@ -0,0 +1,8 @@+---+'@astryxdesign/theme-matcha': patch+'@astryxdesign/cli': patch+---++[feat] Move Matcha's existing color roles onto its reviewed light and dark ramps, including Tea Gold. Warning and Yellow move from `#FFB600` / `#FFC940` to `#F2C000` / `#F6D066`; related syntax colors and warning inset rings follow the same palette. Consumers that need the former appearance can extend `matchaTheme` and override the affected color, syntax, shadow, and component tokens with their previous values. The complete Matcha palette remains private authoring data, and the CLI template ships the same request, receipt, and runtime-sized references.++@rubyycheungdiff --git a/docs/themes/README.md b/docs/themes/README.mdindex 00f7572afc..6d4f3040b3 100644--- a/docs/themes/README.md+++ b/docs/themes/README.md@@ -16,6 +16,7 @@ Current records:- [Neutral](../../packages/themes/neutral/neutral.spec.md) — current- [Stone](../../packages/themes/stone/stone.spec.md) — current- [Gothic](../../packages/themes/gothic/gothic.spec.md) — current+- [Matcha](../../packages/themes/matcha/matcha.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 24a4633f91..e521749022 100644--- a/package.json+++ b/package.json@@ -13,6 +13,8 @@"check:stone-palette-refs": "node scripts/generate-stone-palette-refs.mjs --check","generate:gothic-palette-refs": "node scripts/generate-gothic-palette-refs.mjs","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","dev": "pnpm -F @astryxdesign/storybook dev","test": "vitest run","test:watch": "vitest",@@ -20,7 +22,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: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: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/matcha/matchaPaletteRefs.generated.ts b/packages/cli/assets/templates/themes/matcha/matchaPaletteRefs.generated.tsnew file mode 100644index 0000000000..9bb4bb5e9b--- /dev/null+++ b/packages/cli/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts@@ -0,0 +1,51 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++// Generated from the committed full palette for the stops used by Matcha's+// theme source. Regenerate with `pnpm generate:matcha-palette-refs`.+// Keep the complete palette available for authoring and audits without+// making consumers pay for unused palette stops.+// prettier-ignore+export const matchaPaletteRefs = {+ neutral: {+ light: {0: '#000000', 20: '#3e481d', 30: '#5a6b2a', 40: '#707e46', 70: '#b7c29e', 75: '#c0cba9', 85: '#dce3ce', 95: '#f0f0e0', 100: '#ffffff'},+ dark: {0: '#000000', 5: '#12140e', 10: '#1a1c14', 15: '#1e2016', 20: '#3e481d', 30: '#5a6440', 40: '#707e46', 60: '#94a468', 65: '#92af6a', 70: '#a8bf6a', 75: '#c0cba9', 100: '#ffffff'},+ },+ teal: {+ light: {35: '#245546', 50: '#2e6b5a', 55: '#3a7c6b'},+ dark: {70: '#5ab898', 75: '#6ccaaa'},+ },+ yellow: {+ light: {45: '#836700', 65: '#c19800', 80: '#f2c000'},+ dark: {70: '#d1a500', 75: '#e0b318', 85: '#f6d066', 90: '#ffe08b'},+ },+ blue: {+ light: {35: '#2e4a6e', 50: '#3a5e8c'},+ dark: {50: '#3a5e8c', 70: '#7ba8d4', 75: '#8dbce0'},+ },+ purple: {+ light: {35: '#553a70', 50: '#6b4a8c'},+ dark: {70: '#b08ed4', 75: '#c0a0e0'},+ },+ pink: {+ light: {30: '#8c3a3a', 35: '#a03a5a', 50: '#c44a70'},+ dark: {65: '#d47a7a', 70: '#e07a9a', 75: '#f08aaa'},+ },+ orange: {+ light: {30: '#7c5e3a', 35: '#a06018', 50: '#c47620'},+ dark: {70: '#d4903a', 75: '#e0a04a'},+ },+ green: {+ light: {35: '#3d7a00', 50: '#4d9900'},+ dark: {70: '#6dbf2a', 75: '#80d43a'},+ },+ red: {+ light: {35: '#cc0000', 50: '#fd0000'},+ dark: {70: '#ff5c5c', 75: '#ff7a7a'},+ },+ cyan: {+ light: {35: '#2e6060', 50: '#3a7c7c'},+ dark: {50: '#3a7c7c', 70: '#70c4c4', 75: '#82d4d4'},+ },+} as const;++export default matchaPaletteRefs;diff --git a/packages/cli/assets/templates/themes/matcha/matchaPalettes.generated.receipt.json b/packages/cli/assets/templates/themes/matcha/matchaPalettes.generated.receipt.jsonnew file mode 100644index 0000000000..481271159b--- /dev/null+++ b/packages/cli/assets/templates/themes/matcha/matchaPalettes.generated.receipt.json@@ -0,0 +1,1502 @@+{+ "schemaVersion": 1,+ "recipe": "astryx-oklch-v1",+ "generatorVersion": "palette-generator-v1",+ "candidateFormatVersion": "palette-typescript-v1",+ "candidateSha256": "b216f5594a7b40e15113bd279c31928b6289f11920fa2432d22189d20d46b538",+ "preview": {+ "version": "palette-preview-v1",+ "sha256": "e3c4369e885994091ba03ca45679223e3185c5663d150845e6ab549d8b038889"+ },+ "request": {+ "recipe": "astryx-oklch-v1",+ "vibrancy": 80,+ "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": "Matcha Neutral",+ "seed": "#707e46",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#12140e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#1a1c14",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#1e2016",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#5a6440",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#94a468",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#92af6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#a8bf6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#5a6b2a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#b7c29e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#dce3ce",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#f0f0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red Berry",+ "seed": "#fd0000",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#cc0000",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#ff5c5c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#ff7a7a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "orange",+ "name": "Roasted Orange",+ "seed": "#c47620",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#d4903a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#e0a04a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#7c5e3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a06018",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Tea Gold",+ "seed": "#e8b800",+ "kind": "chromatic",+ "anchors": []+ },+ {+ "id": "green",+ "name": "Matcha Green",+ "seed": "#4d9900",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#3d7a00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#6dbf2a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#80d43a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "teal",+ "name": "Botanical Teal",+ "seed": "#2e6b5a",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#5ab898",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#6ccaaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#245546",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#3a7c6b",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Mineral Cyan",+ "seed": "#3a7c7c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e6060",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#70c4c4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#82d4d4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Rain Blue",+ "seed": "#3a5e8c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e4a6e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#7ba8d4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#8dbce0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Wisteria",+ "seed": "#6b4a8c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#553a70",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#b08ed4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0a0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Camellia Pink",+ "seed": "#c44a70",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#d47a7a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#e07a9a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#f08aaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#8c3a3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a03a5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ }+ ]+ }+ ]+ },+ "diagnostics": {+ "families": {+ "neutral": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.3608200878375407,+ "maximumAdjacentDeltaE": 19.24826223209658,+ "maximumHueDrift": 13.725282054982245,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact",+ "generatedColor": "#3e481d",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#5a6b2a",+ "policy": "exact",+ "generatedColor": "#5a6b2a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact",+ "generatedColor": "#707e46",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#b7c29e",+ "policy": "exact",+ "generatedColor": "#b7c29e",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact",+ "generatedColor": "#c0cba9",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#dce3ce",+ "policy": "exact",+ "generatedColor": "#dce3ce",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#f0f0e0",+ "policy": "exact",+ "generatedColor": "#f0f0e0",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6860658420786527,+ "maximumAdjacentDeltaE": 18.71324123798765,+ "maximumHueDrift": 6.807387695776356,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#12140e",+ "policy": "exact",+ "generatedColor": "#12140e",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#1a1c14",+ "policy": "exact",+ "generatedColor": "#1a1c14",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#1e2016",+ "policy": "exact",+ "generatedColor": "#1e2016",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact",+ "generatedColor": "#3e481d",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#5a6440",+ "policy": "exact",+ "generatedColor": "#5a6440",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact",+ "generatedColor": "#707e46",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#94a468",+ "policy": "exact",+ "generatedColor": "#94a468",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#92af6a",+ "policy": "exact",+ "generatedColor": "#92af6a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#a8bf6a",+ "policy": "exact",+ "generatedColor": "#a8bf6a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact",+ "generatedColor": "#c0cba9",+ "deltaE": 0+ }+ ]+ }+ },+ "red": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.886350029863751,+ "maximumAdjacentDeltaE": 19.896679473359143,+ "maximumHueDrift": 2.5462021538752424,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#cc0000",+ "policy": "exact",+ "generatedColor": "#cc0000",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact",+ "generatedColor": "#fd0000",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 0.9561433596865154,+ "maximumAdjacentDeltaE": 19.896679473359143,+ "maximumHueDrift": 7.624810766667963,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact",+ "generatedColor": "#fd0000",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#ff5c5c",+ "policy": "exact",+ "generatedColor": "#ff5c5c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#ff7a7a",+ "policy": "exact",+ "generatedColor": "#ff7a7a",+ "deltaE": 0+ }+ ]+ }+ },+ "orange": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.538921567588729,+ "maximumAdjacentDeltaE": 18.308472915927197,+ "maximumHueDrift": 8.489230138000494,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 30,+ "color": "#7c5e3a",+ "policy": "exact",+ "generatedColor": "#7c5e3a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a06018",+ "policy": "exact",+ "generatedColor": "#a06018",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact",+ "generatedColor": "#c47620",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 0.9350693203999536,+ "maximumAdjacentDeltaE": 18.515313094421213,+ "maximumHueDrift": 19.314108395811047,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact",+ "generatedColor": "#c47620",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#d4903a",+ "policy": "exact",+ "generatedColor": "#d4903a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#e0a04a",+ "policy": "exact",+ "generatedColor": "#e0a04a",+ "deltaE": 0+ }+ ]+ }+ },+ "yellow": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.266372946680857,+ "maximumAdjacentDeltaE": 18.108804228656158,+ "maximumHueDrift": 8.277463562561138,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 90,+ 95,+ 100+ ],+ "anchors": []+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.266372946680857,+ "maximumAdjacentDeltaE": 18.108804228656158,+ "maximumHueDrift": 8.277463562561138,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 90,+ 95,+ 100+ ],+ "anchors": []+ }+ },+ "green": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.7662758672582224,+ "maximumAdjacentDeltaE": 18.46143075709682,+ "maximumHueDrift": 3.6552897773386803,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#3d7a00",+ "policy": "exact",+ "generatedColor": "#3d7a00",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact",+ "generatedColor": "#4d9900",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.376974795436305,+ "maximumAdjacentDeltaE": 18.46143075709682,+ "maximumHueDrift": 3.7753890860039974,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact",+ "generatedColor": "#4d9900",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#6dbf2a",+ "policy": "exact",+ "generatedColor": "#6dbf2a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#80d43a",+ "policy": "exact",+ "generatedColor": "#80d43a",+ "deltaE": 0+ }+ ]+ }+ },+ "teal": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6787433555198534,+ "maximumAdjacentDeltaE": 18.139952454302026,+ "maximumHueDrift": 4.276584961041863,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#245546",+ "policy": "exact",+ "generatedColor": "#245546",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact",+ "generatedColor": "#2e6b5a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#3a7c6b",+ "policy": "exact",+ "generatedColor": "#3a7c6b",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6943961678164043,+ "maximumAdjacentDeltaE": 18.15677389805662,+ "maximumHueDrift": 3.799196552985677,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact",+ "generatedColor": "#2e6b5a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#5ab898",+ "policy": "exact",+ "generatedColor": "#5ab898",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#6ccaaa",+ "policy": "exact",+ "generatedColor": "#6ccaaa",+ "deltaE": 0+ }+ ]+ }+ },+ "cyan": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.074398660723061,+ "maximumAdjacentDeltaE": 18.3876395051893,+ "maximumHueDrift": 2.924680372406101,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e6060",+ "policy": "exact",+ "generatedColor": "#2e6060",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact",+ "generatedColor": "#3a7c7c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.5094531342953696,+ "maximumAdjacentDeltaE": 18.3876395051893,+ "maximumHueDrift": 2.924680372406101,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact",+ "generatedColor": "#3a7c7c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#70c4c4",+ "policy": "exact",+ "generatedColor": "#70c4c4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#82d4d4",+ "policy": "exact",+ "generatedColor": "#82d4d4",+ "deltaE": 0+ }+ ]+ }+ },+ "blue": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.4769391703364083,+ "maximumAdjacentDeltaE": 19.516758662397937,+ "maximumHueDrift": 4.306611649210822,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e4a6e",+ "policy": "exact",+ "generatedColor": "#2e4a6e",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact",+ "generatedColor": "#3a5e8c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.872677383445442,+ "maximumAdjacentDeltaE": 19.354634049078946,+ "maximumHueDrift": 15.426134844396756,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact",+ "generatedColor": "#3a5e8c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#7ba8d4",+ "policy": "exact",+ "generatedColor": "#7ba8d4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#8dbce0",+ "policy": "exact",+ "generatedColor": "#8dbce0",+ "deltaE": 0+ }+ ]+ }+ },+ "purple": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6203482891371401,+ "maximumAdjacentDeltaE": 19.758085143460793,+ "maximumHueDrift": 1.0945860336720443,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#553a70",+ "policy": "exact",+ "generatedColor": "#553a70",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact",+ "generatedColor": "#6b4a8c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.8083529939870522,+ "maximumAdjacentDeltaE": 19.27874068253957,+ "maximumHueDrift": 1.6386826795561547,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact",+ "generatedColor": "#6b4a8c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#b08ed4",+ "policy": "exact",+ "generatedColor": "#b08ed4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0a0e0",+ "policy": "exact",+ "generatedColor": "#c0a0e0",+ "deltaE": 0+ }+ ]+ }+ },+ "pink": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.329067450417978,+ "maximumAdjacentDeltaE": 19.909113983712736,+ "maximumHueDrift": 23.137739682277527,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 30,+ "color": "#8c3a3a",+ "policy": "exact",+ "generatedColor": "#8c3a3a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a03a5a",+ "policy": "exact",+ "generatedColor": "#a03a5a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact",+ "generatedColor": "#c44a70",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.484372384103008,+ "maximumAdjacentDeltaE": 19.716284943275983,+ "maximumHueDrift": 16.482114212591398,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact",+ "generatedColor": "#c44a70",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#d47a7a",+ "policy": "exact",+ "generatedColor": "#d47a7a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#e07a9a",+ "policy": "exact",+ "generatedColor": "#e07a9a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#f08aaa",+ "policy": "exact",+ "generatedColor": "#f08aaa",+ "deltaE": 0+ }+ ]+ }+ }+ },+ "coordination": [+ {+ "mode": "light",+ "stop": 50,+ "closestFamilies": [+ "Botanical Teal",+ "Mineral Cyan"+ ],+ "minimumFamilyDeltaE": 6.717003506684842,+ "strongestFamily": "Red Berry",+ "weakestFamily": "Mineral Cyan",+ "chromaRatio": 3.818651843047584+ },+ {+ "mode": "dark",+ "stop": 50,+ "closestFamilies": [+ "Botanical Teal",+ "Mineral Cyan"+ ],+ "minimumFamilyDeltaE": 6.717003506684842,+ "strongestFamily": "Red Berry",+ "weakestFamily": "Mineral Cyan",+ "chromaRatio": 3.818651843047584+ }+ ]+ }+}diff --git a/packages/cli/assets/templates/themes/matcha/matchaPalettes.generated.ts b/packages/cli/assets/templates/themes/matcha/matchaPalettes.generated.tsnew file mode 100644index 0000000000..001f4a9869--- /dev/null+++ b/packages/cli/assets/templates/themes/matcha/matchaPalettes.generated.ts@@ -0,0 +1,501 @@+// 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": "Matcha Neutral",+ "light": {+ "0": "#000000",+ "5": "#111604",+ "10": "#21270a",+ "15": "#313914",+ "20": "#3e481d",+ "25": "#4c5924",+ "30": "#5a6b2a",+ "35": "#657438",+ "40": "#707e46",+ "45": "#7c8a54",+ "50": "#879661",+ "55": "#92a06f",+ "60": "#9dab7d",+ "65": "#aab58d",+ "70": "#b7c29e",+ "75": "#c0cba9",+ "80": "#ced7bc",+ "85": "#dce3ce",+ "90": "#e7ead4",+ "95": "#f0f0e0",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#12140e",+ "10": "#1a1c14",+ "15": "#1e2016",+ "20": "#3e481d",+ "25": "#4c552e",+ "30": "#5a6440",+ "35": "#657144",+ "40": "#707e46",+ "45": "#7a894f",+ "50": "#829156",+ "55": "#89995d",+ "60": "#94a468",+ "65": "#92af6a",+ "70": "#a8bf6a",+ "75": "#c0cba9",+ "80": "#cdd8b9",+ "85": "#d9e1c9",+ "90": "#e4ead8",+ "95": "#f0f4e8",+ "100": "#ffffff"+ }+ },+ "red": {+ "name": "Red Berry",+ "light": {+ "0": "#000000",+ "5": "#2c0000",+ "10": "#3e0000",+ "15": "#540000",+ "20": "#710000",+ "25": "#920000",+ "30": "#b10000",+ "35": "#cc0000",+ "40": "#dd0000",+ "45": "#eb0000",+ "50": "#fd0000",+ "55": "#ff4435",+ "60": "#ff5d4c",+ "65": "#ff705f",+ "70": "#ff8372",+ "75": "#ff9989",+ "80": "#ffafa2",+ "85": "#ffc4ba",+ "90": "#ffd8d2",+ "95": "#ffece8",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#2c0000",+ "10": "#3e0000",+ "15": "#500000",+ "20": "#630000",+ "25": "#760000",+ "30": "#8d0000",+ "35": "#a90000",+ "40": "#c70000",+ "45": "#e40000",+ "50": "#fd0000",+ "55": "#ff3731",+ "60": "#ff3d3c",+ "65": "#ff4446",+ "70": "#ff5c5c",+ "75": "#ff7a7a",+ "80": "#ff9794",+ "85": "#ffb3b0",+ "90": "#ffd0cd",+ "95": "#ffeae8",+ "100": "#ffffff"+ }+ },+ "orange": {+ "name": "Roasted Orange",+ "light": {+ "0": "#000000",+ "5": "#1e0c00",+ "10": "#2d1903",+ "15": "#402910",+ "20": "#553d21",+ "25": "#6a5031",+ "30": "#7c5e3a",+ "35": "#a06018",+ "40": "#ad681b",+ "45": "#b96d1d",+ "50": "#c47620",+ "55": "#d47f20",+ "60": "#e0851b",+ "65": "#ec8a13",+ "70": "#f89007",+ "75": "#ff9f3a",+ "80": "#ffb470",+ "85": "#ffc898",+ "90": "#ffdbbc",+ "95": "#ffedde",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#230700",+ "10": "#311100",+ "15": "#3f1a00",+ "20": "#4e2300",+ "25": "#5d2c00",+ "30": "#6f3802",+ "35": "#854709",+ "40": "#9c5613",+ "45": "#b3671b",+ "50": "#c47620",+ "55": "#cd7e26",+ "60": "#cd832e",+ "65": "#cc8735",+ "70": "#d4903a",+ "75": "#e0a04a",+ "80": "#ecb062",+ "85": "#f3c48b",+ "90": "#f8d9b3",+ "95": "#fdedda",+ "100": "#ffffff"+ }+ },+ "yellow": {+ "name": "Tea Gold",+ "light": {+ "0": "#000000",+ "5": "#190f00",+ "10": "#251a00",+ "15": "#312400",+ "20": "#3e2e00",+ "25": "#4b3900",+ "30": "#584400",+ "35": "#664f00",+ "40": "#755b00",+ "45": "#836700",+ "50": "#927300",+ "55": "#a17f00",+ "60": "#b18c00",+ "65": "#c19800",+ "70": "#d1a500",+ "75": "#e1b200",+ "80": "#f2c000",+ "85": "#fccf47",+ "90": "#ffe08b",+ "95": "#fff0c8",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#190f00",+ "10": "#251a00",+ "15": "#312400",+ "20": "#3e2e00",+ "25": "#4b3900",+ "30": "#584400",+ "35": "#664f00",+ "40": "#755b00",+ "45": "#836700",+ "50": "#927300",+ "55": "#a17f00",+ "60": "#b18c00",+ "65": "#c19800",+ "70": "#d1a500",+ "75": "#e0b318",+ "80": "#ebc145",+ "85": "#f6d066",+ "90": "#ffe08b",+ "95": "#fff0c8",+ "100": "#ffffff"+ }+ },+ "green": {+ "name": "Matcha Green",+ "light": {+ "0": "#000000",+ "5": "#031600",+ "10": "#0a2200",+ "15": "#123000",+ "20": "#1d4200",+ "25": "#285600",+ "30": "#346a00",+ "35": "#3d7a00",+ "40": "#438500",+ "45": "#478e00",+ "50": "#4d9900",+ "55": "#55a701",+ "60": "#61b026",+ "65": "#6fb93e",+ "70": "#7ec356",+ "75": "#90cd6f",+ "80": "#a4d888",+ "85": "#b7e4a0",+ "90": "#caf0b8",+ "95": "#defbd0",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#031600",+ "10": "#092200",+ "15": "#112e00",+ "20": "#183a00",+ "25": "#1f4700",+ "30": "#265500",+ "35": "#306600",+ "40": "#397800",+ "45": "#438900",+ "50": "#4d9900",+ "55": "#56a40e",+ "60": "#5aad05",+ "65": "#5fb50a",+ "70": "#6dbf2a",+ "75": "#80d43a",+ "80": "#96e061",+ "85": "#aee988",+ "90": "#c7f2ad",+ "95": "#dffbcf",+ "100": "#ffffff"+ }+ },+ "teal": {+ "name": "Botanical Teal",+ "light": {+ "0": "#000000",+ "5": "#00160e",+ "10": "#002318",+ "15": "#022d21",+ "20": "#0b362a",+ "25": "#153f32",+ "30": "#1e493c",+ "35": "#245546",+ "40": "#275d4d",+ "45": "#2a6252",+ "50": "#2e6b5a",+ "55": "#3a7c6b",+ "60": "#3c8e79",+ "65": "#38a48b",+ "70": "#4ab99f",+ "75": "#63cdb2",+ "80": "#7fdbc2",+ "85": "#9be7d1",+ "90": "#b4f2df",+ "95": "#cefdee",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#00160f",+ "10": "#002219",+ "15": "#002e23",+ "20": "#003a2d",+ "25": "#004737",+ "30": "#065140",+ "35": "#145646",+ "40": "#1f5a4b",+ "45": "#286051",+ "50": "#2e6b5a",+ "55": "#307c67",+ "60": "#369277",+ "65": "#45a889",+ "70": "#5ab898",+ "75": "#6ccaaa",+ "80": "#87d5b9",+ "85": "#a1e2c9",+ "90": "#b9efdb",+ "95": "#d3fceb",+ "100": "#ffffff"+ }+ },+ "cyan": {+ "name": "Mineral Cyan",+ "light": {+ "0": "#000000",+ "5": "#001616",+ "10": "#002122",+ "15": "#032d2d",+ "20": "#0f3939",+ "25": "#1b4646",+ "30": "#275352",+ "35": "#2e6060",+ "40": "#326b6a",+ "45": "#367172",+ "50": "#3a7c7c",+ "55": "#3b8b8c",+ "60": "#369c9d",+ "65": "#2aafb0",+ "70": "#1cc2c3",+ "75": "#53cecf",+ "80": "#7ad9d9",+ "85": "#9ae4e4",+ "90": "#b5efef",+ "95": "#cffbfa",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001616",+ "10": "#002122",+ "15": "#002d2d",+ "20": "#003939",+ "25": "#004546",+ "30": "#085151",+ "35": "#185b5c",+ "40": "#276565",+ "45": "#326f70",+ "50": "#3a7c7c",+ "55": "#418c8d",+ "60": "#4ba0a1",+ "65": "#55b5b5",+ "70": "#70c4c4",+ "75": "#82d4d4",+ "80": "#9cdede",+ "85": "#b1e7e7",+ "90": "#c3f1f0",+ "95": "#d5fbfa",+ "100": "#ffffff"+ }+ },+ "blue": {+ "name": "Rain Blue",+ "light": {+ "0": "#000000",+ "5": "#000f31",+ "10": "#001a41",+ "15": "#03244d",+ "20": "#0f2e54",+ "25": "#1c3659",+ "30": "#274060",+ "35": "#2e4a6e",+ "40": "#32527b",+ "45": "#365680",+ "50": "#3a5e8c",+ "55": "#446da1",+ "60": "#4b81c3",+ "65": "#5d96de",+ "70": "#71abf5",+ "75": "#88bcff",+ "80": "#a0caff",+ "85": "#b9d7ff",+ "90": "#d0e5ff",+ "95": "#e8f2ff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#000f30",+ "10": "#001a41",+ "15": "#002452",+ "20": "#002f65",+ "25": "#003978",+ "30": "#054385",+ "35": "#124989",+ "40": "#1e4e87",+ "45": "#2d5485",+ "50": "#3a5e8c",+ "55": "#466f9d",+ "60": "#5683b3",+ "65": "#6897c9",+ "70": "#7ba8d4",+ "75": "#8dbce0",+ "80": "#a7c9e3",+ "85": "#bdd6ea",+ "90": "#d2e4f3",+ "95": "#e6f2fb",+ "100": "#ffffff"+ }+ },+ "purple": {+ "name": "Wisteria",+ "light": {+ "0": "#000000",+ "5": "#1b012e",+ "10": "#290343",+ "15": "#330a51",+ "20": "#3b175a",+ "25": "#43245f",+ "30": "#4b2f64",+ "35": "#553a70",+ "40": "#5e407b",+ "45": "#634382",+ "50": "#6b4a8c",+ "55": "#7b589f",+ "60": "#9168bc",+ "65": "#aa7ada",+ "70": "#c18cf6",+ "75": "#cea1ff",+ "80": "#d8b4ff",+ "85": "#e1c8ff",+ "90": "#ebdaff",+ "95": "#f5edff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#19042b",+ "10": "#27083e",+ "15": "#330f50",+ "20": "#401760",+ "25": "#4d2171",+ "30": "#572a7c",+ "35": "#5b3180",+ "40": "#5e3881",+ "45": "#624084",+ "50": "#6b4a8c",+ "55": "#7a589d",+ "60": "#8d6bb1",+ "65": "#a07dc6",+ "70": "#b08ed4",+ "75": "#c0a0e0",+ "80": "#cbb1e8",+ "85": "#d9c5ee",+ "90": "#e7d9f6",+ "95": "#f3edfc",+ "100": "#ffffff"+ }+ },+ "pink": {+ "name": "Camellia Pink",+ "light": {+ "0": "#000000",+ "5": "#2c0001",+ "10": "#3e0407",+ "15": "#501213",+ "20": "#642223",+ "25": "#783130",+ "30": "#8c3a3a",+ "35": "#a03a5a",+ "40": "#ae3e61",+ "45": "#b84267",+ "50": "#c44a70",+ "55": "#d5547b",+ "60": "#e85b86",+ "65": "#f86592",+ "70": "#fd7ba0",+ "75": "#ff93af",+ "80": "#ffabbf",+ "85": "#ffc1cf",+ "90": "#ffd6df",+ "95": "#ffebef",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#2a000d",+ "10": "#3c0016",+ "15": "#4d001f",+ "20": "#5f0029",+ "25": "#720032",+ "30": "#85053d",+ "35": "#981449",+ "40": "#a82856",+ "45": "#b63b63",+ "50": "#c44a70",+ "55": "#cd5a71",+ "60": "#cf6a75",+ "65": "#d47a7a",+ "70": "#e07a9a",+ "75": "#f08aaa",+ "80": "#f1a3ba",+ "85": "#f5bbcb",+ "90": "#fad3dd",+ "95": "#fdeaef",+ "100": "#ffffff"+ }+ }+} as const;++export default palette;diff --git a/packages/cli/assets/templates/themes/matcha/matchaPalettes.ts b/packages/cli/assets/templates/themes/matcha/matchaPalettes.tsnew file mode 100644index 0000000000..c3d8984c8a--- /dev/null+++ b/packages/cli/assets/templates/themes/matcha/matchaPalettes.ts@@ -0,0 +1,21 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++import {black, palette, white} from './matchaPalettes.generated';++/** Matcha's reviewed light and dark palette, generated from ../palette.config.json. */+export const matchaPalettes = {+ black,+ white,+ neutral: palette.neutral,+ red: palette.red,+ orange: palette.orange,+ yellow: palette.yellow,+ green: palette.green,+ teal: palette.teal,+ cyan: palette.cyan,+ blue: palette.blue,+ purple: palette.purple,+ pink: palette.pink,+} as const;++export default matchaPalettes;diff --git a/packages/cli/assets/templates/themes/matcha/matchaTheme.ts b/packages/cli/assets/templates/themes/matcha/matchaTheme.tsindex baf86314f4..c30ac32496 100644--- a/packages/cli/assets/templates/themes/matcha/matchaTheme.ts+++ b/packages/cli/assets/templates/themes/matcha/matchaTheme.ts@@ -4,33 +4,38 @@* Matcha Theme** An earthy green theme inspired by matcha tea and natural botanicals.- * Core palette: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF* Uses Playwrite US Trad for headings and DM Sans for body text.*/import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';import {matchaIconRegistry} from './icons';+import {matchaPaletteRefs} from './matchaPaletteRefs.generated';++const {blue, cyan, green, neutral, orange, pink, purple, red, teal, yellow} =+ matchaPaletteRefs;++const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;/** Matcha syntax palette — earthy greens and warm tones. */const matchaSyntax = defineSyntaxTheme({name: 'astryx-matcha',tokens: {- keyword: ['#5a6b2a', '#a8bf6a'],- string: ['#2e6b4a', '#7bc49e'],- comment: ['#707E46', '#707E46'],- number: ['#8c6b30', '#d4b870'],- function: ['#3a5e8c', '#7ba8d4'],- type: ['#6b4a8c', '#b08ed4'],- variable: ['#3E481D', '#C0CBA9'],- operator: ['#707E46', '#94a468'],- constant: ['#8c6b30', '#d4b870'],- tag: ['#8c3a3a', '#d47a7a'],- attribute: ['#7c5e3a', '#c4a882'],- property: ['#3a7c6b', '#70c4b0'],- // #707E46/#5a6440 failed WCAG AA against the syntax background: 3.83:1- // light, 2.73:1 dark. #5386.- punctuation: ['#566a39', '#92af6a'], // 5.19:1 / 7.02:1- background: ['#F0F0E0', '#1a1c14'],+ keyword: [neutral.light[30], neutral.dark[70]],+ string: [teal.light[50], teal.dark[75]],+ comment: [neutral.light[40], neutral.dark[40]],+ number: [yellow.light[45], yellow.dark[75]],+ function: [blue.light[50], blue.dark[70]],+ type: [purple.light[50], purple.dark[70]],+ variable: [neutral.light[20], neutral.dark[75]],+ operator: [neutral.light[40], neutral.dark[60]],+ constant: [yellow.light[45], yellow.dark[75]],+ tag: [pink.light[30], pink.dark[65]],+ attribute: [orange.light[30], yellow.dark[70]],+ property: [teal.light[55], teal.dark[75]],+ // Punctuation uses dedicated neutral stops that maintain WCAG AA against+ // the syntax background in both modes (issue 5386).+ punctuation: [neutral.light[30], neutral.dark[65]],+ background: [neutral.light[95], neutral.dark[10]],},});@@ -62,120 +67,176 @@ export const matchaTheme = defineTheme({tokens: {// =========================================================================// Colors — earthy matcha palette- // Core: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF// =========================================================================// Core semantic- '--color-accent': ['#3E481D', '#C0CBA9'],- '--color-accent-muted': ['#3E481D14', '#C0CBA920'],- '--color-neutral': ['#3E481D0F', '#C0CBA91A'],- '--color-background-surface': ['#FFFFFF', '#1a1c14'],- '--color-background-body': ['#F0F0E0', '#12140e'],- '--color-overlay': ['#3E481D80', '#3E481DCC'],- '--color-overlay-hover': ['#3E481D0D', '#C0CBA90D'],- '--color-overlay-pressed': ['#3E481D1A', '#C0CBA91A'],- '--color-background-muted': ['#F0F0E0', '#3E481D'],+ '--color-accent': [neutral.light[20], neutral.dark[75]],+ '--color-accent-muted': [+ withAlpha(neutral.light[20], '14'),+ withAlpha(neutral.dark[75], '20'),+ ],+ '--color-neutral': [+ withAlpha(neutral.light[20], '0f'),+ withAlpha(neutral.dark[75], '1a'),+ ],+ '--color-background-surface': [neutral.light[100], neutral.dark[10]],+ '--color-background-body': [neutral.light[95], neutral.dark[5]],+ '--color-overlay': [+ withAlpha(neutral.light[20], '80'),+ withAlpha(neutral.dark[20], 'cc'),+ ],+ '--color-overlay-hover': [+ withAlpha(neutral.light[20], '0d'),+ withAlpha(neutral.dark[75], '0d'),+ ],+ '--color-overlay-pressed': [+ withAlpha(neutral.light[20], '1a'),+ withAlpha(neutral.dark[75], '1a'),+ ],+ '--color-background-muted': [neutral.light[95], neutral.dark[20]],// Text- '--color-text-primary': ['#3E481D', '#C0CBA9'],- '--color-text-secondary': ['#707E46', '#94a468'],- '--color-text-disabled': ['#C0CBA9', '#5a6440'],- '--color-text-accent': ['#3E481D', '#C0CBA9'],- '--color-on-dark': '#FFFFFF',- '--color-on-light': '#3E481D',- '--color-on-accent': ['#FFFFFF', '#3E481D'],- '--color-on-success': ['#FFFFFF', '#3E481D'],- '--color-on-error': ['#FFFFFF', '#3E481D'],- '--color-on-warning': ['#3E481D', '#3E481D'],+ '--color-text-primary': [neutral.light[20], neutral.dark[75]],+ '--color-text-secondary': [neutral.light[40], neutral.dark[60]],+ '--color-text-disabled': [neutral.light[75], neutral.dark[30]],+ '--color-text-accent': [neutral.light[20], neutral.dark[75]],+ '--color-on-dark': neutral.light[100],+ '--color-on-light': neutral.light[20],+ '--color-on-accent': [neutral.light[100], neutral.dark[20]],+ '--color-on-success': [neutral.light[100], neutral.dark[20]],+ '--color-on-error': [neutral.light[100], neutral.dark[20]],+ '--color-on-warning': [neutral.light[20], neutral.dark[20]],// Icon- '--color-icon-accent': ['#3E481D', '#C0CBA9'],- '--color-icon-primary': ['#3E481D', '#C0CBA9'],- '--color-icon-secondary': ['#707E46', '#94a468'],- '--color-icon-disabled': ['#C0CBA9', '#5a6440'],+ '--color-icon-accent': [neutral.light[20], neutral.dark[75]],+ '--color-icon-primary': [neutral.light[20], neutral.dark[75]],+ '--color-icon-secondary': [neutral.light[40], neutral.dark[60]],+ '--color-icon-disabled': [neutral.light[75], neutral.dark[30]],// Surface variants- '--color-background-card': ['#FFFFFF', '#1e2016'],- '--color-background-popover': ['#FFFFFF', '#3E481D'],- '--color-background-inverted': ['#3E481D', '#C0CBA9'],+ '--color-background-card': [neutral.light[100], neutral.dark[15]],+ '--color-background-popover': [neutral.light[100], neutral.dark[20]],+ '--color-background-inverted': [neutral.light[20], neutral.dark[75]],// Status / Sentiment- '--color-success': ['#4D9900', '#6dbf2a'],- '--color-success-muted': ['#4D990020', '#6dbf2a20'],- '--color-error': ['#FD0000', '#ff5c5c'],- '--color-error-muted': ['#FD000020', '#ff5c5c20'],- '--color-warning': ['#FFB600', '#ffc940'],- '--color-warning-muted': ['#FFB60020', '#ffc94020'],+ '--color-success': [green.light[50], green.dark[70]],+ '--color-success-muted': [+ withAlpha(green.light[50], '20'),+ withAlpha(green.dark[70], '20'),+ ],+ '--color-error': [red.light[50], red.dark[70]],+ '--color-error-muted': [+ withAlpha(red.light[50], '20'),+ withAlpha(red.dark[70], '20'),+ ],+ '--color-warning': [yellow.light[80], yellow.dark[85]],+ '--color-warning-muted': [+ withAlpha(yellow.light[80], '20'),+ withAlpha(yellow.dark[85], '20'),+ ],// Border// Softer sage borders (default + emphasized/card) in light mode.- '--color-border': ['#DCE3CE', '#C0CBA91A'],- '--color-border-emphasized': ['#B7C29E', '#5a6440'],+ '--color-border': [neutral.light[85], withAlpha(neutral.dark[75], '1a')],+ '--color-border-emphasized': [neutral.light[70], neutral.dark[30]],// Effects- '--color-skeleton': ['#C0CBA9', '#5a6440'],- '--color-shadow': ['#3E481D1A', '#0000004D'],- '--color-tint-hover': ['black', 'white'],+ '--color-skeleton': [neutral.light[75], neutral.dark[30]],+ '--color-shadow': [+ withAlpha(neutral.light[20], '1a'),+ withAlpha(neutral.dark[0], '4d'),+ ],+ '--color-tint-hover': [neutral.light[0], neutral.dark[100]],// Categorical — Blue- '--color-background-blue': ['#3a5e8c33', '#3a5e8c33'],- '--color-border-blue': ['#3a5e8c', '#7ba8d4'],- '--color-icon-blue': ['#3a5e8c', '#7ba8d4'],- '--color-text-blue': ['#2e4a6e', '#8dbce0'],+ '--color-background-blue': [+ withAlpha(blue.light[50], '33'),+ withAlpha(blue.dark[50], '33'),+ ],+ '--color-border-blue': [blue.light[50], blue.dark[70]],+ '--color-icon-blue': [blue.light[50], blue.dark[70]],+ '--color-text-blue': [blue.light[35], blue.dark[75]],// Categorical — Cyan- '--color-background-cyan': ['#3a7c7c33', '#3a7c7c33'],- '--color-border-cyan': ['#3a7c7c', '#70c4c4'],- '--color-icon-cyan': ['#3a7c7c', '#70c4c4'],- '--color-text-cyan': ['#2e6060', '#82d4d4'],+ '--color-background-cyan': [+ withAlpha(cyan.light[50], '33'),+ withAlpha(cyan.dark[50], '33'),+ ],+ '--color-border-cyan': [cyan.light[50], cyan.dark[70]],+ '--color-icon-cyan': [cyan.light[50], cyan.dark[70]],+ '--color-text-cyan': [cyan.light[35], cyan.dark[75]],// Categorical — Gray- '--color-background-gray': ['#707E4633', '#5a644033'],- '--color-border-gray': ['#707E46', '#707E46'],- '--color-icon-gray': ['#707E46', '#94a468'],- '--color-text-gray': ['#3E481D', '#C0CBA9'],+ '--color-background-gray': [+ withAlpha(neutral.light[40], '33'),+ withAlpha(neutral.dark[30], '33'),+ ],+ '--color-border-gray': [neutral.light[40], neutral.dark[40]],+ '--color-icon-gray': [neutral.light[40], neutral.dark[60]],+ '--color-text-gray': [neutral.light[20], neutral.dark[75]],// Categorical — Green- '--color-background-green': ['#4D990033', '#6dbf2a33'],- '--color-border-green': ['#4D9900', '#6dbf2a'],- '--color-icon-green': ['#4D9900', '#6dbf2a'],- '--color-text-green': ['#3d7a00', '#80d43a'],+ '--color-background-green': [+ withAlpha(green.light[50], '33'),+ withAlpha(green.dark[70], '33'),+ ],+ '--color-border-green': [green.light[50], green.dark[70]],+ '--color-icon-green': [green.light[50], green.dark[70]],+ '--color-text-green': [green.light[35], green.dark[75]],// Categorical — Orange- '--color-background-orange': ['#c4762033', '#d4903a33'],- '--color-border-orange': ['#c47620', '#d4903a'],- '--color-icon-orange': ['#c47620', '#d4903a'],- '--color-text-orange': ['#a06018', '#e0a04a'],+ '--color-background-orange': [+ withAlpha(orange.light[50], '33'),+ withAlpha(orange.dark[70], '33'),+ ],+ '--color-border-orange': [orange.light[50], orange.dark[70]],+ '--color-icon-orange': [orange.light[50], orange.dark[70]],+ '--color-text-orange': [orange.light[35], orange.dark[75]],// Categorical — Pink- '--color-background-pink': ['#c44a7033', '#e07a9a33'],- '--color-border-pink': ['#c44a70', '#e07a9a'],- '--color-icon-pink': ['#c44a70', '#e07a9a'],- '--color-text-pink': ['#a03a5a', '#f08aaa'],+ '--color-background-pink': [+ withAlpha(pink.light[50], '33'),+ withAlpha(pink.dark[70], '33'),+ ],+ '--color-border-pink': [pink.light[50], pink.dark[70]],+ '--color-icon-pink': [pink.light[50], pink.dark[70]],+ '--color-text-pink': [pink.light[35], pink.dark[75]],// Categorical — Purple- '--color-background-purple': ['#6b4a8c33', '#b08ed433'],- '--color-border-purple': ['#6b4a8c', '#b08ed4'],- '--color-icon-purple': ['#6b4a8c', '#b08ed4'],- '--color-text-purple': ['#553a70', '#c0a0e0'],+ '--color-background-purple': [+ withAlpha(purple.light[50], '33'),+ withAlpha(purple.dark[70], '33'),+ ],+ '--color-border-purple': [purple.light[50], purple.dark[70]],+ '--color-icon-purple': [purple.light[50], purple.dark[70]],+ '--color-text-purple': [purple.light[35], purple.dark[75]],// Categorical — Red- '--color-background-red': ['#FD000033', '#ff5c5c33'],- '--color-border-red': ['#FD0000', '#ff5c5c'],- '--color-icon-red': ['#FD0000', '#ff5c5c'],- '--color-text-red': ['#cc0000', '#ff7a7a'],+ '--color-background-red': [+ withAlpha(red.light[50], '33'),+ withAlpha(red.dark[70], '33'),+ ],+ '--color-border-red': [red.light[50], red.dark[70]],+ '--color-icon-red': [red.light[50], red.dark[70]],+ '--color-text-red': [red.light[35], red.dark[75]],// Categorical — Teal- '--color-background-teal': ['#2e6b5a33', '#5ab89833'],- '--color-border-teal': ['#2e6b5a', '#5ab898'],- '--color-icon-teal': ['#2e6b5a', '#5ab898'],- '--color-text-teal': ['#245546', '#6ccaaa'],+ '--color-background-teal': [+ withAlpha(teal.light[50], '33'),+ withAlpha(teal.dark[70], '33'),+ ],+ '--color-border-teal': [teal.light[50], teal.dark[70]],+ '--color-icon-teal': [teal.light[50], teal.dark[70]],+ '--color-text-teal': [teal.light[35], teal.dark[75]],// Categorical — Yellow- '--color-background-yellow': ['#FFB60033', '#ffc94033'],- '--color-border-yellow': ['#FFB600', '#ffc940'],- '--color-icon-yellow': ['#FFB600', '#ffc940'],- '--color-text-yellow': ['#cc9200', '#ffd960'],+ '--color-background-yellow': [+ withAlpha(yellow.light[80], '33'),+ withAlpha(yellow.dark[85], '33'),+ ],+ '--color-border-yellow': [yellow.light[80], yellow.dark[85]],+ '--color-icon-yellow': [yellow.light[80], yellow.dark[85]],+ '--color-text-yellow': [yellow.light[65], yellow.dark[90]],// =========================================================================// Spacing@@ -216,14 +277,14 @@ export const matchaTheme = defineTheme({// =========================================================================// Shadows// =========================================================================- '--shadow-low': '0 2px 4px #3E481D0D, 0 4px 8px #3E481D1A',- '--shadow-med': '0 2px 4px #3E481D0D, 0 4px 12px #3E481D1A',- '--shadow-high': '0 4px 6px #3E481D1A, 0 12px 24px #3E481D26',- '--shadow-inset-hover': 'inset 0px 0px 0px 2px #3E481D30',- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #3E481D50',- '--shadow-inset-success': 'inset 0px 0px 0px 2px #4D990050',- '--shadow-inset-warning': 'inset 0px 0px 0px 2px #FFB60050',- '--shadow-inset-error': 'inset 0px 0px 0px 2px #FD000050',+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.light[20], '0d')}, 0 4px 8px ${withAlpha(neutral.light[20], '1a')}`,+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.light[20], '0d')}, 0 4px 12px ${withAlpha(neutral.light[20], '1a')}`,+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.light[20], '1a')}, 0 12px 24px ${withAlpha(neutral.light[20], '26')}`,+ '--shadow-inset-hover': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[20], '30')}`,+ '--shadow-inset-selected': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[20], '50')}`,+ '--shadow-inset-success': `inset 0px 0px 0px 2px ${withAlpha(green.light[50], '50')}`,+ '--shadow-inset-warning': `inset 0px 0px 0px 2px ${withAlpha(yellow.light[80], '50')}`,+ '--shadow-inset-error': `inset 0px 0px 0px 2px ${withAlpha(red.light[50], '50')}`,},components: {diff --git a/packages/cli/assets/templates/themes/matcha/palette.config.json b/packages/cli/assets/templates/themes/matcha/palette.config.jsonnew file mode 100644index 0000000000..29357ab354--- /dev/null+++ b/packages/cli/assets/templates/themes/matcha/palette.config.json@@ -0,0 +1,448 @@+{+ "recipe": "astryx-oklch-v1",+ "vibrancy": 80,+ "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": "Matcha Neutral",+ "seed": "#707e46",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#12140e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#1a1c14",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#1e2016",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#5a6440",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#94a468",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#92af6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#a8bf6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#5a6b2a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#b7c29e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#dce3ce",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#f0f0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red Berry",+ "seed": "#fd0000",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#cc0000",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#ff5c5c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#ff7a7a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "orange",+ "name": "Roasted Orange",+ "seed": "#c47620",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#d4903a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#e0a04a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#7c5e3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a06018",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Tea Gold",+ "seed": "#e8b800",+ "anchors": []+ },+ {+ "id": "green",+ "name": "Matcha Green",+ "seed": "#4d9900",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#3d7a00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#6dbf2a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#80d43a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "teal",+ "name": "Botanical Teal",+ "seed": "#2e6b5a",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#5ab898",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#6ccaaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#245546",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#3a7c6b",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Mineral Cyan",+ "seed": "#3a7c7c",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e6060",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#70c4c4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#82d4d4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Rain Blue",+ "seed": "#3a5e8c",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e4a6e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#7ba8d4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#8dbce0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Wisteria",+ "seed": "#6b4a8c",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#553a70",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#b08ed4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0a0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Camellia Pink",+ "seed": "#c44a70",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#d47a7a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#e07a9a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#f08aaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#8c3a3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a03a5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ }+ ]+ }+ ]+}diff --git a/packages/themes/matcha/README.md b/packages/themes/matcha/README.mdindex c72b79697b..43515b8785 100644--- a/packages/themes/matcha/README.md+++ b/packages/themes/matcha/README.md@@ -23,11 +23,11 @@ function App() {### Import paths-| Path | Use case |-| ----------------------------- | ------------------------------------------------------ |-| `@astryxdesign/theme-matcha` | Source build (StyleX compilation via `@astryxdesign/build`) |-| `@astryxdesign/theme-matcha/built` | Pre-built dist (Tailwind, plain CSS, or no build step) |-| `@astryxdesign/theme-matcha/theme.css` | Pre-built CSS file (import in your stylesheet) |+| Path | Use case |+| -------------------------------------- | ----------------------------------------------------------- |+| `@astryxdesign/theme-matcha` | Source build (StyleX compilation via `@astryxdesign/build`) |+| `@astryxdesign/theme-matcha/built` | Pre-built dist (Tailwind, plain CSS, or no build step) |+| `@astryxdesign/theme-matcha/theme.css` | Pre-built CSS file (import in your stylesheet) |If you're using `@astryxdesign/build` for StyleX source compilation, import from the bare path. Otherwise, use `/built`.@@ -39,6 +39,28 @@ Add the theme CSS to your stylesheet:@import '@astryxdesign/theme-matcha/theme.css';```+## Approved palette++Matcha keeps its generation request in `palette.config.json`, the reviewed+`astryx-oklch-v1` output in `src/matchaPalettes.generated.ts`, and the detached+generation receipt beside it. The palette uses separate light and dark ramps;+Tea Gold is generated from an anchorless golden seed so the family stays smooth.+The runtime theme imports only the selected stops in+`matchaPaletteRefs.generated.ts`.++Use semantic theme tokens in components. Matcha's theme source maps the color+roles it owns to named palette stops; components never read raw palette values+directly. The full palette is a private authoring and audit artifact rather than+a package export, and the prebuilt theme and CSS contain only resolved values.+Changing the palette must include the regenerated receipt,+selected-reference module, token diff, tests, and visual review. Keep+`matchaTheme.ts` and the CLI template copy synchronized when changing a mapping.++The palette is not a component styling API, chart-color API, or accessibility+guarantee. Components should read semantic tokens, charts should use the+data-visualization color API, and every custom foreground/background pair still+needs contextual contrast verification.+## FontsThis theme uses custom typefaces:diff --git a/packages/themes/matcha/matcha.spec.md b/packages/themes/matcha/matcha.spec.mdnew file mode 100644index 0000000000..0a84bda88a--- /dev/null+++ b/packages/themes/matcha/matcha.spec.md@@ -0,0 +1,204 @@+---+schema_version: 2+template_version: 2+kind: theme+id: theme:matcha+authority: current+approved_by: rubyycheung+approved_at: 2026-10-17+review_triggers:+ [tokens, palette-values, component-mappings, contrast, artifacts]+verified_by:+ [+ packages/themes/matcha/src/matchaTheme.test.ts,+ packages/themes/matcha/src/matchaColorMapping.test.ts,+ scripts/generate-matcha-palette-refs.test.mjs,+ ]+package: '@astryxdesign/theme-matcha'+source_theme: packages/themes/matcha/src/matchaTheme.ts+references:+ [+ architecture:theme-authoring-contract,+ architecture:theme-tokens,+ architecture:theme-compilation,+ ]+---++# Matcha theme specification++## Intent and audience++Matcha is an earthy botanical theme with tea-green neutrals, warm Tea Gold, and+restrained natural categorical colors. It serves experiences that want organic+character while preserving familiar semantic hierarchy in light and dark modes.++## Inheritance and base++Matcha 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`. Matcha owns its light and+dark surface ladders, content hierarchy, 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++Matcha defines no public theme-local token names. Its package-specific decisions+use existing portable tokens and component mapping slots.++## Tonal palette definitions++Matcha owns complete private light and dark ramps for neutral, red, orange,+yellow, green, teal, cyan, blue, purple, and pink. The committed request,+generated module, and receipt reproduce the accepted `astryx-oklch-v1` result.+Tea Gold uses seed `#E8B800`, no hard anchors, and a smooth monotonic progression+in both modes.++Palette generation is explicit maintenance work and never runs during a normal+theme build.++## Component and state mappings++Matcha maps existing semantic, categorical, syntax, and color-bearing effect+roles to named Matcha palette stops. Component states keep their existing+meanings and structure. Components consume semantic tokens rather than the+complete palette.++Matcha defines no additional component states or data-visualization colors.++## Compatibility and migration++Matcha exposes no complete generated palette through its package root. The full+palette remains private to authoring, mapping, tests, and review tooling.++Consumers can extend `matchaTheme` and override color, syntax, shadow, and+component values while preserving the released package contract.++## Accessibility and contrast evidence++Matcha-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.++Known normal-text exceptions in the maintained mappings are:++- light secondary body text at 16px is 3.83:1 on the body; typographic role and+ placement distinguish it from primary content;+- light Banner descriptions at 13px over a white surface or card are 3.89:1+ for info, 3.83:1 for success, 4.10:1 for warning, and 3.54:1 for error. Over+ the light body `#f0f0e0`, the same translucent fills produce 3.39:1, 3.37:1,+ 3.63:1, and 3.11:1 respectively. The status icon, title, and written+ description identify each state independently of color;+- success Badge labels at 13px are 3.58:1 light and 4.25:1 dark; the label and+ solid semantic fill identify the state;+- error Badge labels at 13px and destructive Button labels at 16px are 4.06:1+ light and 3.23:1 dark; the written action or status, component shape, and+ error fill are independent cues;+- light warning FieldStatus text at 13px is 2.52:1 when its translucent fill is+ composited over white and 2.23:1 over the light body `#f0f0e0`; its warning+ icon and message text identify the state;+- light Green, Orange, Pink, Red, and Yellow categorical text is respectively+ 4.21:1, 4.03:1, 4.94:1, 4.14:1, and 2.41:1 when each translucent tint is+ composited over white. Over the light body `#f0f0e0`, the same pairs are+ 3.73:1, 3.57:1, 4.37:1, 3.64:1, and 2.15:1. These pairings appear in 13px+ Badge and Token labels and normal-sized Card content, where the written+ category and component form remain independent cues; and+- syntax text at 16px is below 4.5:1 for light comments and operators (3.83:1),+ light properties (4.27:1), and dark comments (3.90:1). Source text and grammar+ remain available without relying on color.++This list covers root body text, inherited semantic Badges and Buttons, Banner+descriptions, FieldStatus, categorical Badge/Token/Card content, and every syntax+role rendered by the maintained Matcha mapping. Disabled text is excluded because+genuinely disabled controls are exempt from minimum text contrast.++## Build and artifact contract++The package and CLI template resolve to the same reviewed palette values and+runtime mappings. Runtime JavaScript and CSS contain only the selected values the+theme consumes, never the complete private candidate. Authoring source and+unexported declaration metadata may retain the complete palette.+Verification fails when package and template output diverge or a selected value+is stale or missing. The source import guard fails when the maintained theme+source imports a relative module other than its icon registry or selected+palette projection.++Normal package builds consume committed values and never regenerate palettes.++## 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. |+| Tea Gold ramp | Palette tests and rendered palette | light and dark; all stops | A hard stop, non-monotonic step, or hue break appears. |+| Role mapping | Matcha mapping and theme tests | semantic, categorical, syntax, effects | A maintained role bypasses selected Matcha references. |+| Runtime boundary | Source import guard | maintained theme source | A relative import other than the icon registry or selected palette projection appears. |+| Package/template parity | Byte comparison and build | package and CLI template | Copies diverge. |++## Decision log++### DEC-1 — Matcha owns one reproducible mode-aware palette++**Reference:** `theme:matcha/DEC-1`+**Decider:** `rubyycheung`, `2026-10-17`++Matcha keeps its tea-green neutral identity, natural categorical colors, and+warm Tea Gold 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 — Tea Gold remains a smooth unanchored ramp++**Reference:** `theme:matcha/DEC-2`+**Decider:** `rubyycheung`, `2026-10-17`++Tea Gold uses seed `#E8B800` at vibrancy 80 without exact anchors. Light and dark+ramps remain monotonic and avoid visible hard stops.++Rejected: exact anchors that introduce abrupt Gold transitions.++### DEC-3 — Existing roles use selected Matcha palette references++**Reference:** `theme:matcha/DEC-3`+**Decider:** `rubyycheung`, `2026-10-17`++Matcha's semantic, categorical, syntax, and color-bearing effect values use+named Matcha 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-4 — Runtime references are deterministic and minimal++**Reference:** `theme:matcha/DEC-4`+**Decider:** `rubyycheung`, `2026-10-17`++The maintained Matcha runtime and the CLI-generated theme resolve to the same+reviewed selected palette values. Runtime JavaScript and CSS omit the complete+private candidate. Unexported authoring declarations may retain it, and normal+builds consume committed values without regenerating the palette.++Rejected: exporting the complete private palette at runtime or allowing package+and generated-template mappings to diverge.++## 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;+ Matcha owns only its theme-specific pairings, exceptions, and measured evidence.++## Content boundary++This record owns Matcha'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/matcha/package.json b/packages/themes/matcha/package.jsonindex bfe84c3112..44fba55e4c 100644--- a/packages/themes/matcha/package.json+++ b/packages/themes/matcha/package.json@@ -50,10 +50,11 @@"dist","src","fonts.css",- "fonts.css.d.ts"+ "fonts.css.d.ts",+ "palette.config.json"],"scripts": {- "build": "node ../../../scripts/clean-dist.mjs && astryx theme build src/matchaTheme.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-matcha-palette-refs.mjs --check && astryx theme build src/matchaTheme.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/matcha/palette.config.json b/packages/themes/matcha/palette.config.jsonnew file mode 100644index 0000000000..29357ab354--- /dev/null+++ b/packages/themes/matcha/palette.config.json@@ -0,0 +1,448 @@+{+ "recipe": "astryx-oklch-v1",+ "vibrancy": 80,+ "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": "Matcha Neutral",+ "seed": "#707e46",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#12140e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#1a1c14",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#1e2016",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#5a6440",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#94a468",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#92af6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#a8bf6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#5a6b2a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#b7c29e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#dce3ce",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#f0f0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red Berry",+ "seed": "#fd0000",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#cc0000",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#ff5c5c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#ff7a7a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "orange",+ "name": "Roasted Orange",+ "seed": "#c47620",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#d4903a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#e0a04a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#7c5e3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a06018",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Tea Gold",+ "seed": "#e8b800",+ "anchors": []+ },+ {+ "id": "green",+ "name": "Matcha Green",+ "seed": "#4d9900",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#3d7a00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#6dbf2a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#80d43a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "teal",+ "name": "Botanical Teal",+ "seed": "#2e6b5a",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#5ab898",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#6ccaaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#245546",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#3a7c6b",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Mineral Cyan",+ "seed": "#3a7c7c",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e6060",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#70c4c4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#82d4d4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Rain Blue",+ "seed": "#3a5e8c",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e4a6e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#7ba8d4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#8dbce0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Wisteria",+ "seed": "#6b4a8c",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#553a70",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#b08ed4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0a0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Camellia Pink",+ "seed": "#c44a70",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#d47a7a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#e07a9a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#f08aaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#8c3a3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a03a5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ }+ ]+ }+ ]+}diff --git a/packages/themes/matcha/src/matchaColorMapping.test.ts b/packages/themes/matcha/src/matchaColorMapping.test.tsnew file mode 100644index 0000000000..e31c1f6a38--- /dev/null+++ b/packages/themes/matcha/src/matchaColorMapping.test.ts@@ -0,0 +1,48 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++import {readFileSync} from 'node:fs';+import {describe, expect, it} from 'vitest';+import {matchaTheme} from './matchaTheme';++const source = readFileSync(+ new URL('./matchaTheme.ts', import.meta.url),+ 'utf8',+);++describe('matcha color token mapping completeness', () => {+ it('does not redefine the data-visualization color system', () => {+ expect(+ Object.keys(matchaTheme.tokens).filter(name =>+ name.startsWith('--color-data-'),+ ),+ ).toEqual([]);+ });++ it('keeps every root color value concrete', () => {+ for (const [name, value] of Object.entries(matchaTheme.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('imports only the selected runtime palette projection', () => {+ const relativeImports = [...source.matchAll(/from ['"](\.[^'"]+)['"]/g)]+ .map(match => match[1])+ .sort();+ expect(relativeImports).toEqual([+ './icons',+ './matchaPaletteRefs.generated',+ ]);+ });++ it('uses no one-off color literals in the maintained theme source', () => {+ expect(source).not.toMatch(+ /#[0-9a-f]{3,8}\b|\brgba?\(|\bhsl[a]?\(|\boklch\(|\bblack\b|\bwhite\b/i,+ );+ });+});diff --git a/packages/themes/matcha/src/matchaPaletteRefs.generated.ts b/packages/themes/matcha/src/matchaPaletteRefs.generated.tsnew file mode 100644index 0000000000..9bb4bb5e9b--- /dev/null+++ b/packages/themes/matcha/src/matchaPaletteRefs.generated.ts@@ -0,0 +1,51 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++// Generated from the committed full palette for the stops used by Matcha's+// theme source. Regenerate with `pnpm generate:matcha-palette-refs`.+// Keep the complete palette available for authoring and audits without+// making consumers pay for unused palette stops.+// prettier-ignore+export const matchaPaletteRefs = {+ neutral: {+ light: {0: '#000000', 20: '#3e481d', 30: '#5a6b2a', 40: '#707e46', 70: '#b7c29e', 75: '#c0cba9', 85: '#dce3ce', 95: '#f0f0e0', 100: '#ffffff'},+ dark: {0: '#000000', 5: '#12140e', 10: '#1a1c14', 15: '#1e2016', 20: '#3e481d', 30: '#5a6440', 40: '#707e46', 60: '#94a468', 65: '#92af6a', 70: '#a8bf6a', 75: '#c0cba9', 100: '#ffffff'},+ },+ teal: {+ light: {35: '#245546', 50: '#2e6b5a', 55: '#3a7c6b'},+ dark: {70: '#5ab898', 75: '#6ccaaa'},+ },+ yellow: {+ light: {45: '#836700', 65: '#c19800', 80: '#f2c000'},+ dark: {70: '#d1a500', 75: '#e0b318', 85: '#f6d066', 90: '#ffe08b'},+ },+ blue: {+ light: {35: '#2e4a6e', 50: '#3a5e8c'},+ dark: {50: '#3a5e8c', 70: '#7ba8d4', 75: '#8dbce0'},+ },+ purple: {+ light: {35: '#553a70', 50: '#6b4a8c'},+ dark: {70: '#b08ed4', 75: '#c0a0e0'},+ },+ pink: {+ light: {30: '#8c3a3a', 35: '#a03a5a', 50: '#c44a70'},+ dark: {65: '#d47a7a', 70: '#e07a9a', 75: '#f08aaa'},+ },+ orange: {+ light: {30: '#7c5e3a', 35: '#a06018', 50: '#c47620'},+ dark: {70: '#d4903a', 75: '#e0a04a'},+ },+ green: {+ light: {35: '#3d7a00', 50: '#4d9900'},+ dark: {70: '#6dbf2a', 75: '#80d43a'},+ },+ red: {+ light: {35: '#cc0000', 50: '#fd0000'},+ dark: {70: '#ff5c5c', 75: '#ff7a7a'},+ },+ cyan: {+ light: {35: '#2e6060', 50: '#3a7c7c'},+ dark: {50: '#3a7c7c', 70: '#70c4c4', 75: '#82d4d4'},+ },+} as const;++export default matchaPaletteRefs;diff --git a/packages/themes/matcha/src/matchaPalettes.generated.receipt.json b/packages/themes/matcha/src/matchaPalettes.generated.receipt.jsonnew file mode 100644index 0000000000..481271159b--- /dev/null+++ b/packages/themes/matcha/src/matchaPalettes.generated.receipt.json@@ -0,0 +1,1502 @@+{+ "schemaVersion": 1,+ "recipe": "astryx-oklch-v1",+ "generatorVersion": "palette-generator-v1",+ "candidateFormatVersion": "palette-typescript-v1",+ "candidateSha256": "b216f5594a7b40e15113bd279c31928b6289f11920fa2432d22189d20d46b538",+ "preview": {+ "version": "palette-preview-v1",+ "sha256": "e3c4369e885994091ba03ca45679223e3185c5663d150845e6ab549d8b038889"+ },+ "request": {+ "recipe": "astryx-oklch-v1",+ "vibrancy": 80,+ "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": "Matcha Neutral",+ "seed": "#707e46",+ "kind": "neutral",+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#12140e",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#1a1c14",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#1e2016",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#5a6440",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#94a468",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#92af6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#a8bf6a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#5a6b2a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#b7c29e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#dce3ce",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#f0f0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "red",+ "name": "Red Berry",+ "seed": "#fd0000",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#cc0000",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#ff5c5c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#ff7a7a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "orange",+ "name": "Roasted Orange",+ "seed": "#c47620",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#d4903a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#e0a04a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#7c5e3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a06018",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "yellow",+ "name": "Tea Gold",+ "seed": "#e8b800",+ "kind": "chromatic",+ "anchors": []+ },+ {+ "id": "green",+ "name": "Matcha Green",+ "seed": "#4d9900",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#3d7a00",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#6dbf2a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#80d43a",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "teal",+ "name": "Botanical Teal",+ "seed": "#2e6b5a",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#5ab898",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#6ccaaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#245546",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#3a7c6b",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "cyan",+ "name": "Mineral Cyan",+ "seed": "#3a7c7c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e6060",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#70c4c4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#82d4d4",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "blue",+ "name": "Rain Blue",+ "seed": "#3a5e8c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e4a6e",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#7ba8d4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#8dbce0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "purple",+ "name": "Wisteria",+ "seed": "#6b4a8c",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#553a70",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#b08ed4",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0a0e0",+ "policy": "exact"+ }+ ]+ },+ {+ "id": "pink",+ "name": "Camellia Pink",+ "seed": "#c44a70",+ "kind": "chromatic",+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#d47a7a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#e07a9a",+ "policy": "exact"+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#f08aaa",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#8c3a3a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a03a5a",+ "policy": "exact"+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact"+ }+ ]+ }+ ]+ },+ "diagnostics": {+ "families": {+ "neutral": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.3608200878375407,+ "maximumAdjacentDeltaE": 19.24826223209658,+ "maximumHueDrift": 13.725282054982245,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact",+ "generatedColor": "#3e481d",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 30,+ "color": "#5a6b2a",+ "policy": "exact",+ "generatedColor": "#5a6b2a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact",+ "generatedColor": "#707e46",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 70,+ "color": "#b7c29e",+ "policy": "exact",+ "generatedColor": "#b7c29e",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact",+ "generatedColor": "#c0cba9",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 85,+ "color": "#dce3ce",+ "policy": "exact",+ "generatedColor": "#dce3ce",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 95,+ "color": "#f0f0e0",+ "policy": "exact",+ "generatedColor": "#f0f0e0",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6860658420786527,+ "maximumAdjacentDeltaE": 18.71324123798765,+ "maximumHueDrift": 6.807387695776356,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 5,+ "color": "#12140e",+ "policy": "exact",+ "generatedColor": "#12140e",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 10,+ "color": "#1a1c14",+ "policy": "exact",+ "generatedColor": "#1a1c14",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 15,+ "color": "#1e2016",+ "policy": "exact",+ "generatedColor": "#1e2016",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 20,+ "color": "#3e481d",+ "policy": "exact",+ "generatedColor": "#3e481d",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 30,+ "color": "#5a6440",+ "policy": "exact",+ "generatedColor": "#5a6440",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 40,+ "color": "#707e46",+ "policy": "exact",+ "generatedColor": "#707e46",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 60,+ "color": "#94a468",+ "policy": "exact",+ "generatedColor": "#94a468",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#92af6a",+ "policy": "exact",+ "generatedColor": "#92af6a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#a8bf6a",+ "policy": "exact",+ "generatedColor": "#a8bf6a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0cba9",+ "policy": "exact",+ "generatedColor": "#c0cba9",+ "deltaE": 0+ }+ ]+ }+ },+ "red": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.886350029863751,+ "maximumAdjacentDeltaE": 19.896679473359143,+ "maximumHueDrift": 2.5462021538752424,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#cc0000",+ "policy": "exact",+ "generatedColor": "#cc0000",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact",+ "generatedColor": "#fd0000",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 0.9561433596865154,+ "maximumAdjacentDeltaE": 19.896679473359143,+ "maximumHueDrift": 7.624810766667963,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#fd0000",+ "policy": "exact",+ "generatedColor": "#fd0000",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#ff5c5c",+ "policy": "exact",+ "generatedColor": "#ff5c5c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#ff7a7a",+ "policy": "exact",+ "generatedColor": "#ff7a7a",+ "deltaE": 0+ }+ ]+ }+ },+ "orange": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.538921567588729,+ "maximumAdjacentDeltaE": 18.308472915927197,+ "maximumHueDrift": 8.489230138000494,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 30,+ "color": "#7c5e3a",+ "policy": "exact",+ "generatedColor": "#7c5e3a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a06018",+ "policy": "exact",+ "generatedColor": "#a06018",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact",+ "generatedColor": "#c47620",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 0.9350693203999536,+ "maximumAdjacentDeltaE": 18.515313094421213,+ "maximumHueDrift": 19.314108395811047,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c47620",+ "policy": "exact",+ "generatedColor": "#c47620",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#d4903a",+ "policy": "exact",+ "generatedColor": "#d4903a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#e0a04a",+ "policy": "exact",+ "generatedColor": "#e0a04a",+ "deltaE": 0+ }+ ]+ }+ },+ "yellow": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.266372946680857,+ "maximumAdjacentDeltaE": 18.108804228656158,+ "maximumHueDrift": 8.277463562561138,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 75,+ 80,+ 90,+ 95,+ 100+ ],+ "anchors": []+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 4.266372946680857,+ "maximumAdjacentDeltaE": 18.108804228656158,+ "maximumHueDrift": 8.277463562561138,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 70,+ 90,+ 95,+ 100+ ],+ "anchors": []+ }+ },+ "green": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.7662758672582224,+ "maximumAdjacentDeltaE": 18.46143075709682,+ "maximumHueDrift": 3.6552897773386803,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#3d7a00",+ "policy": "exact",+ "generatedColor": "#3d7a00",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact",+ "generatedColor": "#4d9900",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.376974795436305,+ "maximumAdjacentDeltaE": 18.46143075709682,+ "maximumHueDrift": 3.7753890860039974,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#4d9900",+ "policy": "exact",+ "generatedColor": "#4d9900",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#6dbf2a",+ "policy": "exact",+ "generatedColor": "#6dbf2a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#80d43a",+ "policy": "exact",+ "generatedColor": "#80d43a",+ "deltaE": 0+ }+ ]+ }+ },+ "teal": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6787433555198534,+ "maximumAdjacentDeltaE": 18.139952454302026,+ "maximumHueDrift": 4.276584961041863,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#245546",+ "policy": "exact",+ "generatedColor": "#245546",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact",+ "generatedColor": "#2e6b5a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 55,+ "color": "#3a7c6b",+ "policy": "exact",+ "generatedColor": "#3a7c6b",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6943961678164043,+ "maximumAdjacentDeltaE": 18.15677389805662,+ "maximumHueDrift": 3.799196552985677,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#2e6b5a",+ "policy": "exact",+ "generatedColor": "#2e6b5a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#5ab898",+ "policy": "exact",+ "generatedColor": "#5ab898",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#6ccaaa",+ "policy": "exact",+ "generatedColor": "#6ccaaa",+ "deltaE": 0+ }+ ]+ }+ },+ "cyan": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.074398660723061,+ "maximumAdjacentDeltaE": 18.3876395051893,+ "maximumHueDrift": 2.924680372406101,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e6060",+ "policy": "exact",+ "generatedColor": "#2e6060",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact",+ "generatedColor": "#3a7c7c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.5094531342953696,+ "maximumAdjacentDeltaE": 18.3876395051893,+ "maximumHueDrift": 2.924680372406101,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 50,+ 55,+ 60,+ 65,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a7c7c",+ "policy": "exact",+ "generatedColor": "#3a7c7c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#70c4c4",+ "policy": "exact",+ "generatedColor": "#70c4c4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#82d4d4",+ "policy": "exact",+ "generatedColor": "#82d4d4",+ "deltaE": 0+ }+ ]+ }+ },+ "blue": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.4769391703364083,+ "maximumAdjacentDeltaE": 19.516758662397937,+ "maximumHueDrift": 4.306611649210822,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#2e4a6e",+ "policy": "exact",+ "generatedColor": "#2e4a6e",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact",+ "generatedColor": "#3a5e8c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.872677383445442,+ "maximumAdjacentDeltaE": 19.354634049078946,+ "maximumHueDrift": 15.426134844396756,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#3a5e8c",+ "policy": "exact",+ "generatedColor": "#3a5e8c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#7ba8d4",+ "policy": "exact",+ "generatedColor": "#7ba8d4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#8dbce0",+ "policy": "exact",+ "generatedColor": "#8dbce0",+ "deltaE": 0+ }+ ]+ }+ },+ "purple": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.6203482891371401,+ "maximumAdjacentDeltaE": 19.758085143460793,+ "maximumHueDrift": 1.0945860336720443,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 35,+ "color": "#553a70",+ "policy": "exact",+ "generatedColor": "#553a70",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact",+ "generatedColor": "#6b4a8c",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 1.8083529939870522,+ "maximumAdjacentDeltaE": 19.27874068253957,+ "maximumHueDrift": 1.6386826795561547,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#6b4a8c",+ "policy": "exact",+ "generatedColor": "#6b4a8c",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#b08ed4",+ "policy": "exact",+ "generatedColor": "#b08ed4",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#c0a0e0",+ "policy": "exact",+ "generatedColor": "#c0a0e0",+ "deltaE": 0+ }+ ]+ }+ },+ "pink": {+ "light": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 2.329067450417978,+ "maximumAdjacentDeltaE": 19.909113983712736,+ "maximumHueDrift": 23.137739682277527,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 40,+ 45,+ 65,+ 70,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "light",+ "stop": 30,+ "color": "#8c3a3a",+ "policy": "exact",+ "generatedColor": "#8c3a3a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 35,+ "color": "#a03a5a",+ "policy": "exact",+ "generatedColor": "#a03a5a",+ "deltaE": 0+ },+ {+ "mode": "light",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact",+ "generatedColor": "#c44a70",+ "deltaE": 0+ }+ ]+ },+ "dark": {+ "monotonic": true,+ "minimumAdjacentDeltaE": 3.484372384103008,+ "maximumAdjacentDeltaE": 19.716284943275983,+ "maximumHueDrift": 16.482114212591398,+ "hueIdentityRisk": null,+ "gamutMappedStops": [+ 5,+ 10,+ 15,+ 20,+ 25,+ 30,+ 35,+ 75,+ 80,+ 85,+ 90,+ 95,+ 100+ ],+ "anchors": [+ {+ "mode": "dark",+ "stop": 50,+ "color": "#c44a70",+ "policy": "exact",+ "generatedColor": "#c44a70",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 65,+ "color": "#d47a7a",+ "policy": "exact",+ "generatedColor": "#d47a7a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 70,+ "color": "#e07a9a",+ "policy": "exact",+ "generatedColor": "#e07a9a",+ "deltaE": 0+ },+ {+ "mode": "dark",+ "stop": 75,+ "color": "#f08aaa",+ "policy": "exact",+ "generatedColor": "#f08aaa",+ "deltaE": 0+ }+ ]+ }+ }+ },+ "coordination": [+ {+ "mode": "light",+ "stop": 50,+ "closestFamilies": [+ "Botanical Teal",+ "Mineral Cyan"+ ],+ "minimumFamilyDeltaE": 6.717003506684842,+ "strongestFamily": "Red Berry",+ "weakestFamily": "Mineral Cyan",+ "chromaRatio": 3.818651843047584+ },+ {+ "mode": "dark",+ "stop": 50,+ "closestFamilies": [+ "Botanical Teal",+ "Mineral Cyan"+ ],+ "minimumFamilyDeltaE": 6.717003506684842,+ "strongestFamily": "Red Berry",+ "weakestFamily": "Mineral Cyan",+ "chromaRatio": 3.818651843047584+ }+ ]+ }+}diff --git a/packages/themes/matcha/src/matchaPalettes.generated.ts b/packages/themes/matcha/src/matchaPalettes.generated.tsnew file mode 100644index 0000000000..001f4a9869--- /dev/null+++ b/packages/themes/matcha/src/matchaPalettes.generated.ts@@ -0,0 +1,501 @@+// 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": "Matcha Neutral",+ "light": {+ "0": "#000000",+ "5": "#111604",+ "10": "#21270a",+ "15": "#313914",+ "20": "#3e481d",+ "25": "#4c5924",+ "30": "#5a6b2a",+ "35": "#657438",+ "40": "#707e46",+ "45": "#7c8a54",+ "50": "#879661",+ "55": "#92a06f",+ "60": "#9dab7d",+ "65": "#aab58d",+ "70": "#b7c29e",+ "75": "#c0cba9",+ "80": "#ced7bc",+ "85": "#dce3ce",+ "90": "#e7ead4",+ "95": "#f0f0e0",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#12140e",+ "10": "#1a1c14",+ "15": "#1e2016",+ "20": "#3e481d",+ "25": "#4c552e",+ "30": "#5a6440",+ "35": "#657144",+ "40": "#707e46",+ "45": "#7a894f",+ "50": "#829156",+ "55": "#89995d",+ "60": "#94a468",+ "65": "#92af6a",+ "70": "#a8bf6a",+ "75": "#c0cba9",+ "80": "#cdd8b9",+ "85": "#d9e1c9",+ "90": "#e4ead8",+ "95": "#f0f4e8",+ "100": "#ffffff"+ }+ },+ "red": {+ "name": "Red Berry",+ "light": {+ "0": "#000000",+ "5": "#2c0000",+ "10": "#3e0000",+ "15": "#540000",+ "20": "#710000",+ "25": "#920000",+ "30": "#b10000",+ "35": "#cc0000",+ "40": "#dd0000",+ "45": "#eb0000",+ "50": "#fd0000",+ "55": "#ff4435",+ "60": "#ff5d4c",+ "65": "#ff705f",+ "70": "#ff8372",+ "75": "#ff9989",+ "80": "#ffafa2",+ "85": "#ffc4ba",+ "90": "#ffd8d2",+ "95": "#ffece8",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#2c0000",+ "10": "#3e0000",+ "15": "#500000",+ "20": "#630000",+ "25": "#760000",+ "30": "#8d0000",+ "35": "#a90000",+ "40": "#c70000",+ "45": "#e40000",+ "50": "#fd0000",+ "55": "#ff3731",+ "60": "#ff3d3c",+ "65": "#ff4446",+ "70": "#ff5c5c",+ "75": "#ff7a7a",+ "80": "#ff9794",+ "85": "#ffb3b0",+ "90": "#ffd0cd",+ "95": "#ffeae8",+ "100": "#ffffff"+ }+ },+ "orange": {+ "name": "Roasted Orange",+ "light": {+ "0": "#000000",+ "5": "#1e0c00",+ "10": "#2d1903",+ "15": "#402910",+ "20": "#553d21",+ "25": "#6a5031",+ "30": "#7c5e3a",+ "35": "#a06018",+ "40": "#ad681b",+ "45": "#b96d1d",+ "50": "#c47620",+ "55": "#d47f20",+ "60": "#e0851b",+ "65": "#ec8a13",+ "70": "#f89007",+ "75": "#ff9f3a",+ "80": "#ffb470",+ "85": "#ffc898",+ "90": "#ffdbbc",+ "95": "#ffedde",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#230700",+ "10": "#311100",+ "15": "#3f1a00",+ "20": "#4e2300",+ "25": "#5d2c00",+ "30": "#6f3802",+ "35": "#854709",+ "40": "#9c5613",+ "45": "#b3671b",+ "50": "#c47620",+ "55": "#cd7e26",+ "60": "#cd832e",+ "65": "#cc8735",+ "70": "#d4903a",+ "75": "#e0a04a",+ "80": "#ecb062",+ "85": "#f3c48b",+ "90": "#f8d9b3",+ "95": "#fdedda",+ "100": "#ffffff"+ }+ },+ "yellow": {+ "name": "Tea Gold",+ "light": {+ "0": "#000000",+ "5": "#190f00",+ "10": "#251a00",+ "15": "#312400",+ "20": "#3e2e00",+ "25": "#4b3900",+ "30": "#584400",+ "35": "#664f00",+ "40": "#755b00",+ "45": "#836700",+ "50": "#927300",+ "55": "#a17f00",+ "60": "#b18c00",+ "65": "#c19800",+ "70": "#d1a500",+ "75": "#e1b200",+ "80": "#f2c000",+ "85": "#fccf47",+ "90": "#ffe08b",+ "95": "#fff0c8",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#190f00",+ "10": "#251a00",+ "15": "#312400",+ "20": "#3e2e00",+ "25": "#4b3900",+ "30": "#584400",+ "35": "#664f00",+ "40": "#755b00",+ "45": "#836700",+ "50": "#927300",+ "55": "#a17f00",+ "60": "#b18c00",+ "65": "#c19800",+ "70": "#d1a500",+ "75": "#e0b318",+ "80": "#ebc145",+ "85": "#f6d066",+ "90": "#ffe08b",+ "95": "#fff0c8",+ "100": "#ffffff"+ }+ },+ "green": {+ "name": "Matcha Green",+ "light": {+ "0": "#000000",+ "5": "#031600",+ "10": "#0a2200",+ "15": "#123000",+ "20": "#1d4200",+ "25": "#285600",+ "30": "#346a00",+ "35": "#3d7a00",+ "40": "#438500",+ "45": "#478e00",+ "50": "#4d9900",+ "55": "#55a701",+ "60": "#61b026",+ "65": "#6fb93e",+ "70": "#7ec356",+ "75": "#90cd6f",+ "80": "#a4d888",+ "85": "#b7e4a0",+ "90": "#caf0b8",+ "95": "#defbd0",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#031600",+ "10": "#092200",+ "15": "#112e00",+ "20": "#183a00",+ "25": "#1f4700",+ "30": "#265500",+ "35": "#306600",+ "40": "#397800",+ "45": "#438900",+ "50": "#4d9900",+ "55": "#56a40e",+ "60": "#5aad05",+ "65": "#5fb50a",+ "70": "#6dbf2a",+ "75": "#80d43a",+ "80": "#96e061",+ "85": "#aee988",+ "90": "#c7f2ad",+ "95": "#dffbcf",+ "100": "#ffffff"+ }+ },+ "teal": {+ "name": "Botanical Teal",+ "light": {+ "0": "#000000",+ "5": "#00160e",+ "10": "#002318",+ "15": "#022d21",+ "20": "#0b362a",+ "25": "#153f32",+ "30": "#1e493c",+ "35": "#245546",+ "40": "#275d4d",+ "45": "#2a6252",+ "50": "#2e6b5a",+ "55": "#3a7c6b",+ "60": "#3c8e79",+ "65": "#38a48b",+ "70": "#4ab99f",+ "75": "#63cdb2",+ "80": "#7fdbc2",+ "85": "#9be7d1",+ "90": "#b4f2df",+ "95": "#cefdee",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#00160f",+ "10": "#002219",+ "15": "#002e23",+ "20": "#003a2d",+ "25": "#004737",+ "30": "#065140",+ "35": "#145646",+ "40": "#1f5a4b",+ "45": "#286051",+ "50": "#2e6b5a",+ "55": "#307c67",+ "60": "#369277",+ "65": "#45a889",+ "70": "#5ab898",+ "75": "#6ccaaa",+ "80": "#87d5b9",+ "85": "#a1e2c9",+ "90": "#b9efdb",+ "95": "#d3fceb",+ "100": "#ffffff"+ }+ },+ "cyan": {+ "name": "Mineral Cyan",+ "light": {+ "0": "#000000",+ "5": "#001616",+ "10": "#002122",+ "15": "#032d2d",+ "20": "#0f3939",+ "25": "#1b4646",+ "30": "#275352",+ "35": "#2e6060",+ "40": "#326b6a",+ "45": "#367172",+ "50": "#3a7c7c",+ "55": "#3b8b8c",+ "60": "#369c9d",+ "65": "#2aafb0",+ "70": "#1cc2c3",+ "75": "#53cecf",+ "80": "#7ad9d9",+ "85": "#9ae4e4",+ "90": "#b5efef",+ "95": "#cffbfa",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#001616",+ "10": "#002122",+ "15": "#002d2d",+ "20": "#003939",+ "25": "#004546",+ "30": "#085151",+ "35": "#185b5c",+ "40": "#276565",+ "45": "#326f70",+ "50": "#3a7c7c",+ "55": "#418c8d",+ "60": "#4ba0a1",+ "65": "#55b5b5",+ "70": "#70c4c4",+ "75": "#82d4d4",+ "80": "#9cdede",+ "85": "#b1e7e7",+ "90": "#c3f1f0",+ "95": "#d5fbfa",+ "100": "#ffffff"+ }+ },+ "blue": {+ "name": "Rain Blue",+ "light": {+ "0": "#000000",+ "5": "#000f31",+ "10": "#001a41",+ "15": "#03244d",+ "20": "#0f2e54",+ "25": "#1c3659",+ "30": "#274060",+ "35": "#2e4a6e",+ "40": "#32527b",+ "45": "#365680",+ "50": "#3a5e8c",+ "55": "#446da1",+ "60": "#4b81c3",+ "65": "#5d96de",+ "70": "#71abf5",+ "75": "#88bcff",+ "80": "#a0caff",+ "85": "#b9d7ff",+ "90": "#d0e5ff",+ "95": "#e8f2ff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#000f30",+ "10": "#001a41",+ "15": "#002452",+ "20": "#002f65",+ "25": "#003978",+ "30": "#054385",+ "35": "#124989",+ "40": "#1e4e87",+ "45": "#2d5485",+ "50": "#3a5e8c",+ "55": "#466f9d",+ "60": "#5683b3",+ "65": "#6897c9",+ "70": "#7ba8d4",+ "75": "#8dbce0",+ "80": "#a7c9e3",+ "85": "#bdd6ea",+ "90": "#d2e4f3",+ "95": "#e6f2fb",+ "100": "#ffffff"+ }+ },+ "purple": {+ "name": "Wisteria",+ "light": {+ "0": "#000000",+ "5": "#1b012e",+ "10": "#290343",+ "15": "#330a51",+ "20": "#3b175a",+ "25": "#43245f",+ "30": "#4b2f64",+ "35": "#553a70",+ "40": "#5e407b",+ "45": "#634382",+ "50": "#6b4a8c",+ "55": "#7b589f",+ "60": "#9168bc",+ "65": "#aa7ada",+ "70": "#c18cf6",+ "75": "#cea1ff",+ "80": "#d8b4ff",+ "85": "#e1c8ff",+ "90": "#ebdaff",+ "95": "#f5edff",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#19042b",+ "10": "#27083e",+ "15": "#330f50",+ "20": "#401760",+ "25": "#4d2171",+ "30": "#572a7c",+ "35": "#5b3180",+ "40": "#5e3881",+ "45": "#624084",+ "50": "#6b4a8c",+ "55": "#7a589d",+ "60": "#8d6bb1",+ "65": "#a07dc6",+ "70": "#b08ed4",+ "75": "#c0a0e0",+ "80": "#cbb1e8",+ "85": "#d9c5ee",+ "90": "#e7d9f6",+ "95": "#f3edfc",+ "100": "#ffffff"+ }+ },+ "pink": {+ "name": "Camellia Pink",+ "light": {+ "0": "#000000",+ "5": "#2c0001",+ "10": "#3e0407",+ "15": "#501213",+ "20": "#642223",+ "25": "#783130",+ "30": "#8c3a3a",+ "35": "#a03a5a",+ "40": "#ae3e61",+ "45": "#b84267",+ "50": "#c44a70",+ "55": "#d5547b",+ "60": "#e85b86",+ "65": "#f86592",+ "70": "#fd7ba0",+ "75": "#ff93af",+ "80": "#ffabbf",+ "85": "#ffc1cf",+ "90": "#ffd6df",+ "95": "#ffebef",+ "100": "#ffffff"+ },+ "dark": {+ "0": "#000000",+ "5": "#2a000d",+ "10": "#3c0016",+ "15": "#4d001f",+ "20": "#5f0029",+ "25": "#720032",+ "30": "#85053d",+ "35": "#981449",+ "40": "#a82856",+ "45": "#b63b63",+ "50": "#c44a70",+ "55": "#cd5a71",+ "60": "#cf6a75",+ "65": "#d47a7a",+ "70": "#e07a9a",+ "75": "#f08aaa",+ "80": "#f1a3ba",+ "85": "#f5bbcb",+ "90": "#fad3dd",+ "95": "#fdeaef",+ "100": "#ffffff"+ }+ }+} as const;++export default palette;diff --git a/packages/themes/matcha/src/matchaPalettes.test.ts b/packages/themes/matcha/src/matchaPalettes.test.tsnew file mode 100644index 0000000000..4e07813319--- /dev/null+++ b/packages/themes/matcha/src/matchaPalettes.test.ts@@ -0,0 +1,50 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++import {describe, expect, it} from 'vitest';+import {matchaPalettes} from './matchaPalettes';++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',+ 'blue',+ 'cyan',+ 'green',+ 'orange',+ 'pink',+ 'purple',+ 'red',+ 'teal',+ 'yellow',+] as const;++describe('matcha palette artifact', () => {+ it('exposes complete reviewed light and dark ramps', () => {+ expect(new Set(Object.keys(matchaPalettes))).toEqual(+ new Set(['black', 'white', ...families]),+ );+ for (const familyName of families) {+ const family = matchaPalettes[familyName];+ for (const mode of ['light', 'dark'] as const) {+ for (const stop of stops) {+ expect(family[mode][stop]).toMatch(/^#[0-9a-f]{6}$/i);+ }+ expect(family[mode][0]).toBe('#000000');+ expect(family[mode][100]).toBe('#ffffff');+ }+ }+ });++ it('keeps Matcha semantic, categorical, and Tea Gold values exact', () => {+ expect(matchaPalettes.neutral.light[20]).toBe('#3e481d');+ expect(matchaPalettes.neutral.light[40]).toBe('#707e46');+ expect(matchaPalettes.neutral.light[75]).toBe('#c0cba9');+ expect(matchaPalettes.neutral.light[95]).toBe('#f0f0e0');+ expect(matchaPalettes.neutral.dark[5]).toBe('#12140e');+ expect(matchaPalettes.neutral.dark[75]).toBe('#c0cba9');+ expect(matchaPalettes.yellow.light[80]).toBe('#f2c000');+ expect(matchaPalettes.yellow.dark[85]).toBe('#f6d066');+ });+});diff --git a/packages/themes/matcha/src/matchaPalettes.ts b/packages/themes/matcha/src/matchaPalettes.tsnew file mode 100644index 0000000000..c3d8984c8a--- /dev/null+++ b/packages/themes/matcha/src/matchaPalettes.ts@@ -0,0 +1,21 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++import {black, palette, white} from './matchaPalettes.generated';++/** Matcha's reviewed light and dark palette, generated from ../palette.config.json. */+export const matchaPalettes = {+ black,+ white,+ neutral: palette.neutral,+ red: palette.red,+ orange: palette.orange,+ yellow: palette.yellow,+ green: palette.green,+ teal: palette.teal,+ cyan: palette.cyan,+ blue: palette.blue,+ purple: palette.purple,+ pink: palette.pink,+} as const;++export default matchaPalettes;diff --git a/packages/themes/matcha/src/matchaTheme.test.ts b/packages/themes/matcha/src/matchaTheme.test.tsnew file mode 100644index 0000000000..6a0d6464cd--- /dev/null+++ b/packages/themes/matcha/src/matchaTheme.test.ts@@ -0,0 +1,77 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++import {describe, expect, it} from 'vitest';+import {resolveThemeTokens} from '@astryxdesign/core/theme';+import {matchaPalettes} from './matchaPalettes';+import {matchaTheme} from './matchaTheme';++const categoricalFamilies = [+ 'blue',+ 'cyan',+ 'green',+ 'orange',+ 'pink',+ 'purple',+ 'red',+ 'teal',+] as const;++describe('matcha palette mapping', () => {+ it.each(['light', 'dark'] as const)(+ 'maps the neutral surface ladder in %s mode',+ mode => {+ const tokens = resolveThemeTokens(matchaTheme, {mode});+ const ramp = matchaPalettes.neutral[mode];+ expect(tokens['--color-background-body']).toBe(+ ramp[mode === 'light' ? 95 : 5],+ );+ expect(tokens['--color-background-surface']).toBe(+ ramp[mode === 'light' ? 100 : 10],+ );+ expect(tokens['--color-background-card']).toBe(+ ramp[mode === 'light' ? 100 : 15],+ );+ expect(tokens['--color-text-primary']).toBe(+ ramp[mode === 'light' ? 20 : 75],+ );+ expect(tokens['--color-text-secondary']).toBe(+ ramp[mode === 'light' ? 40 : 60],+ );+ },+ );++ it.each(['light', 'dark'] as const)(+ 'maps categorical roles to reviewed %s stops',+ mode => {+ const tokens = resolveThemeTokens(matchaTheme, {mode});+ for (const family of categoricalFamilies) {+ const ramp = matchaPalettes[family][mode];+ const backgroundStop =+ mode === 'light' || family === 'blue' || family === 'cyan' ? 50 : 70;+ expect(tokens[`--color-background-${family}`]).toBe(+ `${ramp[backgroundStop]}33`,+ );+ expect(tokens[`--color-border-${family}`]).toBe(+ ramp[mode === 'light' ? 50 : 70],+ );+ expect(tokens[`--color-icon-${family}`]).toBe(+ ramp[mode === 'light' ? 50 : 70],+ );+ expect(tokens[`--color-text-${family}`]).toBe(+ ramp[mode === 'light' ? 35 : 75],+ );+ }+ },+ );++ it('maps warning and syntax roles to the reviewed Tea Gold ramp', () => {+ const light = resolveThemeTokens(matchaTheme, {mode: 'light'});+ const dark = resolveThemeTokens(matchaTheme, {mode: 'dark'});+ expect(light['--color-warning']).toBe(matchaPalettes.yellow.light[80]);+ expect(dark['--color-warning']).toBe(matchaPalettes.yellow.dark[85]);+ expect(light['--color-syntax-number']).toBe(+ matchaPalettes.yellow.light[45],+ );+ expect(dark['--color-syntax-number']).toBe(matchaPalettes.yellow.dark[75]);+ });+});diff --git a/packages/themes/matcha/src/matchaTheme.ts b/packages/themes/matcha/src/matchaTheme.tsindex baf86314f4..c30ac32496 100644--- a/packages/themes/matcha/src/matchaTheme.ts+++ b/packages/themes/matcha/src/matchaTheme.ts@@ -4,33 +4,38 @@* Matcha Theme** An earthy green theme inspired by matcha tea and natural botanicals.- * Core palette: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF* Uses Playwrite US Trad for headings and DM Sans for body text.*/import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';import {matchaIconRegistry} from './icons';+import {matchaPaletteRefs} from './matchaPaletteRefs.generated';++const {blue, cyan, green, neutral, orange, pink, purple, red, teal, yellow} =+ matchaPaletteRefs;++const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;/** Matcha syntax palette — earthy greens and warm tones. */const matchaSyntax = defineSyntaxTheme({name: 'astryx-matcha',tokens: {- keyword: ['#5a6b2a', '#a8bf6a'],- string: ['#2e6b4a', '#7bc49e'],- comment: ['#707E46', '#707E46'],- number: ['#8c6b30', '#d4b870'],- function: ['#3a5e8c', '#7ba8d4'],- type: ['#6b4a8c', '#b08ed4'],- variable: ['#3E481D', '#C0CBA9'],- operator: ['#707E46', '#94a468'],- constant: ['#8c6b30', '#d4b870'],- tag: ['#8c3a3a', '#d47a7a'],- attribute: ['#7c5e3a', '#c4a882'],- property: ['#3a7c6b', '#70c4b0'],- // #707E46/#5a6440 failed WCAG AA against the syntax background: 3.83:1- // light, 2.73:1 dark. #5386.- punctuation: ['#566a39', '#92af6a'], // 5.19:1 / 7.02:1- background: ['#F0F0E0', '#1a1c14'],+ keyword: [neutral.light[30], neutral.dark[70]],+ string: [teal.light[50], teal.dark[75]],+ comment: [neutral.light[40], neutral.dark[40]],+ number: [yellow.light[45], yellow.dark[75]],+ function: [blue.light[50], blue.dark[70]],+ type: [purple.light[50], purple.dark[70]],+ variable: [neutral.light[20], neutral.dark[75]],+ operator: [neutral.light[40], neutral.dark[60]],+ constant: [yellow.light[45], yellow.dark[75]],+ tag: [pink.light[30], pink.dark[65]],+ attribute: [orange.light[30], yellow.dark[70]],+ property: [teal.light[55], teal.dark[75]],+ // Punctuation uses dedicated neutral stops that maintain WCAG AA against+ // the syntax background in both modes (issue 5386).+ punctuation: [neutral.light[30], neutral.dark[65]],+ background: [neutral.light[95], neutral.dark[10]],},});@@ -62,120 +67,176 @@ export const matchaTheme = defineTheme({tokens: {// =========================================================================// Colors — earthy matcha palette- // Core: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF// =========================================================================// Core semantic- '--color-accent': ['#3E481D', '#C0CBA9'],- '--color-accent-muted': ['#3E481D14', '#C0CBA920'],- '--color-neutral': ['#3E481D0F', '#C0CBA91A'],- '--color-background-surface': ['#FFFFFF', '#1a1c14'],- '--color-background-body': ['#F0F0E0', '#12140e'],- '--color-overlay': ['#3E481D80', '#3E481DCC'],- '--color-overlay-hover': ['#3E481D0D', '#C0CBA90D'],- '--color-overlay-pressed': ['#3E481D1A', '#C0CBA91A'],- '--color-background-muted': ['#F0F0E0', '#3E481D'],+ '--color-accent': [neutral.light[20], neutral.dark[75]],+ '--color-accent-muted': [+ withAlpha(neutral.light[20], '14'),+ withAlpha(neutral.dark[75], '20'),+ ],+ '--color-neutral': [+ withAlpha(neutral.light[20], '0f'),+ withAlpha(neutral.dark[75], '1a'),+ ],+ '--color-background-surface': [neutral.light[100], neutral.dark[10]],+ '--color-background-body': [neutral.light[95], neutral.dark[5]],+ '--color-overlay': [+ withAlpha(neutral.light[20], '80'),+ withAlpha(neutral.dark[20], 'cc'),+ ],+ '--color-overlay-hover': [+ withAlpha(neutral.light[20], '0d'),+ withAlpha(neutral.dark[75], '0d'),+ ],+ '--color-overlay-pressed': [+ withAlpha(neutral.light[20], '1a'),+ withAlpha(neutral.dark[75], '1a'),+ ],+ '--color-background-muted': [neutral.light[95], neutral.dark[20]],// Text- '--color-text-primary': ['#3E481D', '#C0CBA9'],- '--color-text-secondary': ['#707E46', '#94a468'],- '--color-text-disabled': ['#C0CBA9', '#5a6440'],- '--color-text-accent': ['#3E481D', '#C0CBA9'],- '--color-on-dark': '#FFFFFF',- '--color-on-light': '#3E481D',- '--color-on-accent': ['#FFFFFF', '#3E481D'],- '--color-on-success': ['#FFFFFF', '#3E481D'],- '--color-on-error': ['#FFFFFF', '#3E481D'],- '--color-on-warning': ['#3E481D', '#3E481D'],+ '--color-text-primary': [neutral.light[20], neutral.dark[75]],+ '--color-text-secondary': [neutral.light[40], neutral.dark[60]],+ '--color-text-disabled': [neutral.light[75], neutral.dark[30]],+ '--color-text-accent': [neutral.light[20], neutral.dark[75]],+ '--color-on-dark': neutral.light[100],+ '--color-on-light': neutral.light[20],+ '--color-on-accent': [neutral.light[100], neutral.dark[20]],+ '--color-on-success': [neutral.light[100], neutral.dark[20]],+ '--color-on-error': [neutral.light[100], neutral.dark[20]],+ '--color-on-warning': [neutral.light[20], neutral.dark[20]],// Icon- '--color-icon-accent': ['#3E481D', '#C0CBA9'],- '--color-icon-primary': ['#3E481D', '#C0CBA9'],- '--color-icon-secondary': ['#707E46', '#94a468'],- '--color-icon-disabled': ['#C0CBA9', '#5a6440'],+ '--color-icon-accent': [neutral.light[20], neutral.dark[75]],+ '--color-icon-primary': [neutral.light[20], neutral.dark[75]],+ '--color-icon-secondary': [neutral.light[40], neutral.dark[60]],+ '--color-icon-disabled': [neutral.light[75], neutral.dark[30]],// Surface variants- '--color-background-card': ['#FFFFFF', '#1e2016'],- '--color-background-popover': ['#FFFFFF', '#3E481D'],- '--color-background-inverted': ['#3E481D', '#C0CBA9'],+ '--color-background-card': [neutral.light[100], neutral.dark[15]],+ '--color-background-popover': [neutral.light[100], neutral.dark[20]],+ '--color-background-inverted': [neutral.light[20], neutral.dark[75]],// Status / Sentiment- '--color-success': ['#4D9900', '#6dbf2a'],- '--color-success-muted': ['#4D990020', '#6dbf2a20'],- '--color-error': ['#FD0000', '#ff5c5c'],- '--color-error-muted': ['#FD000020', '#ff5c5c20'],- '--color-warning': ['#FFB600', '#ffc940'],- '--color-warning-muted': ['#FFB60020', '#ffc94020'],+ '--color-success': [green.light[50], green.dark[70]],+ '--color-success-muted': [+ withAlpha(green.light[50], '20'),+ withAlpha(green.dark[70], '20'),+ ],+ '--color-error': [red.light[50], red.dark[70]],+ '--color-error-muted': [+ withAlpha(red.light[50], '20'),+ withAlpha(red.dark[70], '20'),+ ],+ '--color-warning': [yellow.light[80], yellow.dark[85]],+ '--color-warning-muted': [+ withAlpha(yellow.light[80], '20'),+ withAlpha(yellow.dark[85], '20'),+ ],// Border// Softer sage borders (default + emphasized/card) in light mode.- '--color-border': ['#DCE3CE', '#C0CBA91A'],- '--color-border-emphasized': ['#B7C29E', '#5a6440'],+ '--color-border': [neutral.light[85], withAlpha(neutral.dark[75], '1a')],+ '--color-border-emphasized': [neutral.light[70], neutral.dark[30]],// Effects- '--color-skeleton': ['#C0CBA9', '#5a6440'],- '--color-shadow': ['#3E481D1A', '#0000004D'],- '--color-tint-hover': ['black', 'white'],+ '--color-skeleton': [neutral.light[75], neutral.dark[30]],+ '--color-shadow': [+ withAlpha(neutral.light[20], '1a'),+ withAlpha(neutral.dark[0], '4d'),+ ],+ '--color-tint-hover': [neutral.light[0], neutral.dark[100]],// Categorical — Blue- '--color-background-blue': ['#3a5e8c33', '#3a5e8c33'],- '--color-border-blue': ['#3a5e8c', '#7ba8d4'],- '--color-icon-blue': ['#3a5e8c', '#7ba8d4'],- '--color-text-blue': ['#2e4a6e', '#8dbce0'],+ '--color-background-blue': [+ withAlpha(blue.light[50], '33'),+ withAlpha(blue.dark[50], '33'),+ ],+ '--color-border-blue': [blue.light[50], blue.dark[70]],+ '--color-icon-blue': [blue.light[50], blue.dark[70]],+ '--color-text-blue': [blue.light[35], blue.dark[75]],// Categorical — Cyan- '--color-background-cyan': ['#3a7c7c33', '#3a7c7c33'],- '--color-border-cyan': ['#3a7c7c', '#70c4c4'],- '--color-icon-cyan': ['#3a7c7c', '#70c4c4'],- '--color-text-cyan': ['#2e6060', '#82d4d4'],+ '--color-background-cyan': [+ withAlpha(cyan.light[50], '33'),+ withAlpha(cyan.dark[50], '33'),+ ],+ '--color-border-cyan': [cyan.light[50], cyan.dark[70]],+ '--color-icon-cyan': [cyan.light[50], cyan.dark[70]],+ '--color-text-cyan': [cyan.light[35], cyan.dark[75]],// Categorical — Gray- '--color-background-gray': ['#707E4633', '#5a644033'],- '--color-border-gray': ['#707E46', '#707E46'],- '--color-icon-gray': ['#707E46', '#94a468'],- '--color-text-gray': ['#3E481D', '#C0CBA9'],+ '--color-background-gray': [+ withAlpha(neutral.light[40], '33'),+ withAlpha(neutral.dark[30], '33'),+ ],+ '--color-border-gray': [neutral.light[40], neutral.dark[40]],+ '--color-icon-gray': [neutral.light[40], neutral.dark[60]],+ '--color-text-gray': [neutral.light[20], neutral.dark[75]],// Categorical — Green- '--color-background-green': ['#4D990033', '#6dbf2a33'],- '--color-border-green': ['#4D9900', '#6dbf2a'],- '--color-icon-green': ['#4D9900', '#6dbf2a'],- '--color-text-green': ['#3d7a00', '#80d43a'],+ '--color-background-green': [+ withAlpha(green.light[50], '33'),+ withAlpha(green.dark[70], '33'),+ ],+ '--color-border-green': [green.light[50], green.dark[70]],+ '--color-icon-green': [green.light[50], green.dark[70]],+ '--color-text-green': [green.light[35], green.dark[75]],// Categorical — Orange- '--color-background-orange': ['#c4762033', '#d4903a33'],- '--color-border-orange': ['#c47620', '#d4903a'],- '--color-icon-orange': ['#c47620', '#d4903a'],- '--color-text-orange': ['#a06018', '#e0a04a'],+ '--color-background-orange': [+ withAlpha(orange.light[50], '33'),+ withAlpha(orange.dark[70], '33'),+ ],+ '--color-border-orange': [orange.light[50], orange.dark[70]],+ '--color-icon-orange': [orange.light[50], orange.dark[70]],+ '--color-text-orange': [orange.light[35], orange.dark[75]],// Categorical — Pink- '--color-background-pink': ['#c44a7033', '#e07a9a33'],- '--color-border-pink': ['#c44a70', '#e07a9a'],- '--color-icon-pink': ['#c44a70', '#e07a9a'],- '--color-text-pink': ['#a03a5a', '#f08aaa'],+ '--color-background-pink': [+ withAlpha(pink.light[50], '33'),+ withAlpha(pink.dark[70], '33'),+ ],+ '--color-border-pink': [pink.light[50], pink.dark[70]],+ '--color-icon-pink': [pink.light[50], pink.dark[70]],+ '--color-text-pink': [pink.light[35], pink.dark[75]],// Categorical — Purple- '--color-background-purple': ['#6b4a8c33', '#b08ed433'],- '--color-border-purple': ['#6b4a8c', '#b08ed4'],- '--color-icon-purple': ['#6b4a8c', '#b08ed4'],- '--color-text-purple': ['#553a70', '#c0a0e0'],+ '--color-background-purple': [+ withAlpha(purple.light[50], '33'),+ withAlpha(purple.dark[70], '33'),+ ],+ '--color-border-purple': [purple.light[50], purple.dark[70]],+ '--color-icon-purple': [purple.light[50], purple.dark[70]],+ '--color-text-purple': [purple.light[35], purple.dark[75]],// Categorical — Red- '--color-background-red': ['#FD000033', '#ff5c5c33'],- '--color-border-red': ['#FD0000', '#ff5c5c'],- '--color-icon-red': ['#FD0000', '#ff5c5c'],- '--color-text-red': ['#cc0000', '#ff7a7a'],+ '--color-background-red': [+ withAlpha(red.light[50], '33'),+ withAlpha(red.dark[70], '33'),+ ],+ '--color-border-red': [red.light[50], red.dark[70]],+ '--color-icon-red': [red.light[50], red.dark[70]],+ '--color-text-red': [red.light[35], red.dark[75]],// Categorical — Teal- '--color-background-teal': ['#2e6b5a33', '#5ab89833'],- '--color-border-teal': ['#2e6b5a', '#5ab898'],- '--color-icon-teal': ['#2e6b5a', '#5ab898'],- '--color-text-teal': ['#245546', '#6ccaaa'],+ '--color-background-teal': [+ withAlpha(teal.light[50], '33'),+ withAlpha(teal.dark[70], '33'),+ ],+ '--color-border-teal': [teal.light[50], teal.dark[70]],+ '--color-icon-teal': [teal.light[50], teal.dark[70]],+ '--color-text-teal': [teal.light[35], teal.dark[75]],// Categorical — Yellow- '--color-background-yellow': ['#FFB60033', '#ffc94033'],- '--color-border-yellow': ['#FFB600', '#ffc940'],- '--color-icon-yellow': ['#FFB600', '#ffc940'],- '--color-text-yellow': ['#cc9200', '#ffd960'],+ '--color-background-yellow': [+ withAlpha(yellow.light[80], '33'),+ withAlpha(yellow.dark[85], '33'),+ ],+ '--color-border-yellow': [yellow.light[80], yellow.dark[85]],+ '--color-icon-yellow': [yellow.light[80], yellow.dark[85]],+ '--color-text-yellow': [yellow.light[65], yellow.dark[90]],// =========================================================================// Spacing@@ -216,14 +277,14 @@ export const matchaTheme = defineTheme({// =========================================================================// Shadows// =========================================================================- '--shadow-low': '0 2px 4px #3E481D0D, 0 4px 8px #3E481D1A',- '--shadow-med': '0 2px 4px #3E481D0D, 0 4px 12px #3E481D1A',- '--shadow-high': '0 4px 6px #3E481D1A, 0 12px 24px #3E481D26',- '--shadow-inset-hover': 'inset 0px 0px 0px 2px #3E481D30',- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #3E481D50',- '--shadow-inset-success': 'inset 0px 0px 0px 2px #4D990050',- '--shadow-inset-warning': 'inset 0px 0px 0px 2px #FFB60050',- '--shadow-inset-error': 'inset 0px 0px 0px 2px #FD000050',+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.light[20], '0d')}, 0 4px 8px ${withAlpha(neutral.light[20], '1a')}`,+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.light[20], '0d')}, 0 4px 12px ${withAlpha(neutral.light[20], '1a')}`,+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.light[20], '1a')}, 0 12px 24px ${withAlpha(neutral.light[20], '26')}`,+ '--shadow-inset-hover': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[20], '30')}`,+ '--shadow-inset-selected': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[20], '50')}`,+ '--shadow-inset-success': `inset 0px 0px 0px 2px ${withAlpha(green.light[50], '50')}`,+ '--shadow-inset-warning': `inset 0px 0px 0px 2px ${withAlpha(yellow.light[80], '50')}`,+ '--shadow-inset-error': `inset 0px 0px 0px 2px ${withAlpha(red.light[50], '50')}`,},components: {diff --git a/scripts/generate-matcha-palette-refs.mjs b/scripts/generate-matcha-palette-refs.mjsnew file mode 100644index 0000000000..8f3bb43f16--- /dev/null+++ b/scripts/generate-matcha-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/matcha/src/matchaTheme.ts';+export const FULL_PALETTE_REL =+ 'packages/themes/matcha/src/matchaPalettes.generated.ts';+export const SELECTED_REFS_REL =+ 'packages/themes/matcha/src/matchaPaletteRefs.generated.ts';+export const TEMPLATE_REFS_REL =+ 'packages/cli/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts';++const generator = createSelectedPaletteRefGenerator({+ themeDisplayName: 'Matcha',+ paletteRefsIdentifier: 'matchaPaletteRefs',+ themeSourceRel: THEME_SOURCE_REL,+ fullPaletteRel: FULL_PALETTE_REL,+ selectedRefsRel: SELECTED_REFS_REL,+ templateRefsRel: TEMPLATE_REFS_REL,+ regenerateCommand: 'pnpm generate:matcha-palette-refs',+});++export function generateMatchaPaletteRefs({root = ROOT, check = false} = {}) {+ return generator.generateSelectedPaletteRefs({root, check});+}++function main() {+ const check = process.argv.includes('--check');+ const result = generateMatchaPaletteRefs({check});+ const count = countSelectedRefs(result.selected);++ if (check && result.problems.length > 0) {+ process.stderr.write(+ `\nMatcha selected palette refs are out of sync:\n` ++ result.problems+ .map(+ problem =>+ ` - ${path.relative(ROOT, problem.output)} ${problem.reason}`,+ )+ .join('\n') ++ `\nRun: pnpm generate:matcha-palette-refs\n\n`,+ );+ return 1;+ }++ if (check) {+ process.stdout.write(+ `Matcha 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-matcha-palette-refs.test.mjs b/scripts/generate-matcha-palette-refs.test.mjsnew file mode 100644index 0000000000..10e2bc5ca4--- /dev/null+++ b/scripts/generate-matcha-palette-refs.test.mjs@@ -0,0 +1,152 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++/**+ * @file Focused tests for Matcha's selected palette-reference wrapper.+ * @input Synthetic Matcha theme references and full-palette literals.+ * @output Proof that Matcha binds the shared generator to both required outputs.+ * @position Regression coverage for generate-matcha-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,+ generateMatchaPaletteRefs,+} from './generate-matcha-palette-refs.mjs';++const FULL_PALETTE = `export const palette = {+ blue: {+ name: 'Blue',+ dark: {25: '#778899', 80: '#aabbcc'},+ },+ neutral: {+ name: 'Matcha Neutral',+ dark: {5: '#111111'},+ },+} as const;+`;++const THEME_SOURCE = `+const {blue: matchaBlue, neutral} = matchaPaletteRefs;+export const matchaTheme = {+ first: matchaBlue.dark[80],+ direct: matchaPaletteRefs.blue.dark[25],+ repeated: matchaBlue.dark[80],+ surface: neutral.dark[5],+};+`;++describe('Matcha 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-matcha-palette-'),+ );+ try {+ fs.copyFileSync(+ path.join(root, 'packages/themes/matcha/palette.config.json'),+ path.join(temp, 'palette.config.json'),+ );+ themePaletteGenerate(+ 'palette.config.json',+ {+ out: 'matchaPalettes.generated.ts',+ preview: 'matcha-palette-preview.html',+ },+ {cwd: temp},+ );++ const generated = fs.readFileSync(+ path.join(temp, 'matchaPalettes.generated.ts'),+ 'utf8',+ );+ const committed = fs+ .readFileSync(+ path.join(+ root,+ 'packages/themes/matcha/src/matchaPalettes.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, 'matchaPalettes.generated.receipt.json'),+ 'utf8',+ ),+ ),+ JSON.parse(+ fs.readFileSync(+ path.join(+ root,+ 'packages/themes/matcha/src/matchaPalettes.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-matcha-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 = generateMatchaPaletteRefs({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 Matcha's",+ );+ expect(generated.content).toContain(+ '// theme source. Regenerate with `pnpm generate:matcha-palette-refs`.',+ );+ expect(generated.content).toContain('export const matchaPaletteRefs = {');+ expect(generated.content).toContain(+ "dark: {25: '#778899', 80: '#aabbcc'}",+ );+ expect(generated.content).toContain('export default matchaPaletteRefs;');+ for (const output of generated.outputs) {+ expect(fs.readFileSync(output, 'utf-8')).toBe(generated.content);+ }++ expect(generateMatchaPaletteRefs({root, check: true}).problems).toEqual(+ [],+ );+ fs.appendFileSync(path.join(root, TEMPLATE_REFS_REL), '// stale\n');+ expect(generateMatchaPaletteRefs({root, check: true}).problems).toEqual([+ {output: path.join(root, TEMPLATE_REFS_REL), reason: 'differs'},+ ]);+ } finally {+ fs.rmSync(root, {recursive: true, force: true});+ }+ });+});