Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

Adopt reviewed Y2K palette (#7675)

rubyycheung3c4005ec29f7
diff --git a/.changeset/y2k-reviewed-palette.md b/.changeset/y2k-reviewed-palette.md
new file mode 100644
index 0000000000..6ecabbc057
--- /dev/null
+++ b/.changeset/y2k-reviewed-palette.md
@@ -0,0 +1,8 @@
+---
+'@astryxdesign/theme-y2k': patch
+'@astryxdesign/cli': patch
+---
+
+[feat] Keep Y2K's released `y2kPalettes` object byte-identical while moving the maintained Light/Dark theme to reviewed named palette stops. Periwinkle `#CCCFFA` and Neon Green `#C5E17A` remain exact; syntax becomes brighter, the dark code background moves from `#190F00` to `#0E0F1A`, and dark Gray background moves from `#EDE0D4` to `#DFE2F3`. The necessary dark input and unchecked-selection outline moves from the released `#3A3F5E` to Neutral Dark 45 `#636889`, raising contrast on the input surface from 1.71:1 to 3.23:1. Consumers that need the former appearance can extend `y2kTheme` and override the affected color, syntax, shadow, and component values with their previous values. The CLI template ships the same private palette request, receipt, and runtime-sized references.
+
+@rubyycheung
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/y2k-palette/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/y2k-palette/page.tsx
index d2817b5be1..5242ef53c6 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/y2k-palette/page.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/y2k-palette/page.tsx
@@ -8,24 +8,84 @@
import {VStack} from '@astryxdesign/core/Layout';
import {y2kTheme} from '@astryxdesign/theme-y2k/built';
-// `y2kPalettes` is only exported from the source entry, not /built.
-import {y2kPalettes} from '@astryxdesign/theme-y2k';
+import {palette as y2kModePalettes} from '../../../../../../../packages/themes/y2k/src/y2kPalettes.generated';
import {ThemePalettePreview} from '@/components/ThemePalettePreview';
import type {TonalColor} from '@/components/ThemePalettePreview';
const CRIMSON = "'Crimson Text', Georgia, 'Times New Roman', serif";
+// Use the reviewed mode-aware ramps the maintained theme consumes, not the
+// frozen public compatibility snapshot.
const TONAL_COLORS: TonalColor[] = [
- {name: 'Y2K Neutral', sourceHex: '#c3b7ab', note: 'H=75 C=8', tones: y2kPalettes.neutral},
- {name: 'Green', sourceHex: '#C5E17A', semantic: 'Success', tones: y2kPalettes.green},
- {name: 'Red', sourceHex: '#FF9E9A', semantic: 'Error', tones: y2kPalettes.red},
- {name: 'Yellow', sourceHex: '#FFCC55', semantic: 'Warning', tones: y2kPalettes.yellow},
- {name: 'Blue', sourceHex: '#8ECFFF', tones: y2kPalettes.blue},
- {name: 'Pink', sourceHex: '#FFA0C8', tones: y2kPalettes.pink},
- {name: 'Purple', sourceHex: '#C0AAFF', tones: y2kPalettes.purple},
- {name: 'Cyan', sourceHex: '#70E8D0', tones: y2kPalettes.cyan},
- {name: 'Orange', sourceHex: '#FFAA66', tones: y2kPalettes.orange},
- {name: 'Teal', sourceHex: '#78E0B0', tones: y2kPalettes.teal},
+ {
+ name: 'Y2K Neutral',
+ sourceHex: '#FFF6ED',
+ tones: y2kModePalettes.neutral.light,
+ dark: {tones: y2kModePalettes.neutral.dark},
+ },
+ {
+ name: 'Periwinkle',
+ sourceHex: '#CCCFFA',
+ tones: y2kModePalettes.accent.light,
+ dark: {tones: y2kModePalettes.accent.dark},
+ },
+ {
+ name: 'Green',
+ sourceHex: '#C5E17A',
+ semantic: 'Success',
+ tones: y2kModePalettes.green.light,
+ dark: {tones: y2kModePalettes.green.dark},
+ },
+ {
+ name: 'Red',
+ sourceHex: '#FF6F7A',
+ semantic: 'Error',
+ tones: y2kModePalettes.red.light,
+ dark: {tones: y2kModePalettes.red.dark},
+ },
+ {
+ name: 'Yellow',
+ sourceHex: '#FFD34F',
+ semantic: 'Warning',
+ tones: y2kModePalettes.yellow.light,
+ dark: {tones: y2kModePalettes.yellow.dark},
+ },
+ {
+ name: 'Blue',
+ sourceHex: '#00A8FF',
+ tones: y2kModePalettes.blue.light,
+ dark: {tones: y2kModePalettes.blue.dark},
+ },
+ {
+ name: 'Pink',
+ sourceHex: '#FF72B6',
+ tones: y2kModePalettes.pink.light,
+ dark: {tones: y2kModePalettes.pink.dark},
+ },
+ {
+ name: 'Purple',
+ sourceHex: '#A589FF',
+ tones: y2kModePalettes.purple.light,
+ dark: {tones: y2kModePalettes.purple.dark},
+ },
+ {
+ name: 'Cyan',
+ sourceHex: '#42D4D0',
+ tones: y2kModePalettes.cyan.light,
+ dark: {tones: y2kModePalettes.cyan.dark},
+ },
+ {
+ name: 'Orange',
+ sourceHex: '#FF9F4A',
+ tones: y2kModePalettes.orange.light,
+ dark: {tones: y2kModePalettes.orange.dark},
+ },
+ {
+ name: 'Teal',
+ sourceHex: '#48C99A',
+ tones: y2kModePalettes.teal.light,
+ dark: {tones: y2kModePalettes.teal.dark},
+ },
];
const sectionTitle: React.CSSProperties = {
@@ -40,9 +100,33 @@ function DisplayTextSection() {
<div>
<h3 style={sectionTitle}>Display Text (Crimson Text)</h3>
<VStack gap={2}>
- <span style={{fontFamily: CRIMSON, fontSize: 83, fontWeight: 400, lineHeight: 1.15}}>Display 1</span>
- <span style={{fontFamily: CRIMSON, fontSize: 67, fontWeight: 400, lineHeight: 1.15}}>Display 2</span>
- <span style={{fontFamily: CRIMSON, fontSize: 53, fontWeight: 400, lineHeight: 1.2}}>Display 3</span>
+ <span
+ style={{
+ fontFamily: CRIMSON,
+ fontSize: 83,
+ fontWeight: 400,
+ lineHeight: 1.15,
+ }}>
+ Display 1
+ </span>
+ <span
+ style={{
+ fontFamily: CRIMSON,
+ fontSize: 67,
+ fontWeight: 400,
+ lineHeight: 1.15,
+ }}>
+ Display 2
+ </span>
+ <span
+ style={{
+ fontFamily: CRIMSON,
+ fontSize: 53,
+ fontWeight: 400,
+ lineHeight: 1.2,
+ }}>
+ Display 3
+ </span>
</VStack>
</div>
);
diff --git a/apps/sandbox/src/app/(sandbox)/pages/palette-generator/generator.test.ts b/apps/sandbox/src/app/(sandbox)/pages/palette-generator/generator.test.ts
index 6bd1f56180..4ef2638856 100644
--- a/apps/sandbox/src/app/(sandbox)/pages/palette-generator/generator.test.ts
+++ b/apps/sandbox/src/app/(sandbox)/pages/palette-generator/generator.test.ts
@@ -58,6 +58,29 @@ describe('experimental palette generator', () => {
}
});
+ it('keeps Y2K comparison inputs aligned with its reviewed palette request', () => {
+ const y2k = THEME_REFERENCES.find(theme => theme.id === 'y2k');
+
+ expect(y2k?.suggestedVibrancy).toEqual({oklch: 72, hct: 53, compare: 72});
+ expect(
+ Object.fromEntries(
+ y2k?.families.map(family => [family.id, family.seed]) ?? [],
+ ),
+ ).toEqual({
+ neutral: '#fff6ed',
+ accent: '#cccffa',
+ red: '#ff6f7a',
+ orange: '#ff9f4a',
+ yellow: '#ffd34f',
+ green: '#c5e17a',
+ teal: '#48c99a',
+ cyan: '#42d4d0',
+ blue: '#00a8ff',
+ purple: '#a589ff',
+ pink: '#ff72b6',
+ });
+ });
+
it('supports the full and compact stop presets', () => {
expect(validateStops([...FULL_21_STOPS])).toHaveLength(21);
expect(validateStops([...COMPACT_11_STOPS])).toHaveLength(11);
diff --git a/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts b/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts
index 29447b515e..9d923a08c2 100644
--- a/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts
+++ b/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts
@@ -3,7 +3,7 @@
import {palette as butterModePalettes} from '../../../../../../../packages/themes/butter/src/butterPalettes.generated';
import {palette as gothicModePalettes} from '../../../../../../../packages/themes/gothic/src/gothicPalettes.generated';
import {palette as stoneModePalettes} from '../../../../../../../packages/themes/stone/src/stonePalettes.generated';
-import {y2kPalettes} from '@astryxdesign/theme-y2k';
+import {palette as y2kModePalettes} from '../../../../../../../packages/themes/y2k/src/y2kPalettes.generated';
import {hexToHct, hctToHex} from '../color-studio/colorUtils';
import {FULL_21_STOPS, type PaletteMode} from './generator';
@@ -253,19 +253,91 @@ const y2kFamilies = [
storedFamily(
'neutral',
'Y2K Neutral',
- '#c3b7ab',
- y2kPalettes.neutral,
+ '#fff6ed',
+ y2kModePalettes.neutral.light,
'neutral',
+ y2kModePalettes.neutral.dark,
+ ),
+ storedFamily(
+ 'accent',
+ 'Periwinkle',
+ '#cccffa',
+ y2kModePalettes.accent.light,
+ 'chromatic',
+ y2kModePalettes.accent.dark,
+ ),
+ storedFamily(
+ 'red',
+ 'Red',
+ '#ff6f7a',
+ y2kModePalettes.red.light,
+ 'chromatic',
+ y2kModePalettes.red.dark,
+ ),
+ storedFamily(
+ 'orange',
+ 'Orange',
+ '#ff9f4a',
+ y2kModePalettes.orange.light,
+ 'chromatic',
+ y2kModePalettes.orange.dark,
+ ),
+ storedFamily(
+ 'yellow',
+ 'Yellow',
+ '#ffd34f',
+ y2kModePalettes.yellow.light,
+ 'chromatic',
+ y2kModePalettes.yellow.dark,
+ ),
+ storedFamily(
+ 'green',
+ 'Green',
+ '#c5e17a',
+ y2kModePalettes.green.light,
+ 'chromatic',
+ y2kModePalettes.green.dark,
+ ),
+ storedFamily(
+ 'teal',
+ 'Teal',
+ '#48c99a',
+ y2kModePalettes.teal.light,
+ 'chromatic',
+ y2kModePalettes.teal.dark,
+ ),
+ storedFamily(
+ 'cyan',
+ 'Cyan',
+ '#42d4d0',
+ y2kModePalettes.cyan.light,
+ 'chromatic',
+ y2kModePalettes.cyan.dark,
+ ),
+ storedFamily(
+ 'blue',
+ 'Blue',
+ '#00a8ff',
+ y2kModePalettes.blue.light,
+ 'chromatic',
+ y2kModePalettes.blue.dark,
+ ),
+ storedFamily(
+ 'purple',
+ 'Purple',
+ '#a589ff',
+ y2kModePalettes.purple.light,
+ 'chromatic',
+ y2kModePalettes.purple.dark,
+ ),
+ storedFamily(
+ 'pink',
+ 'Pink',
+ '#ff72b6',
+ y2kModePalettes.pink.light,
+ 'chromatic',
+ y2kModePalettes.pink.dark,
),
- storedFamily('green', 'Green', '#c5e17a', y2kPalettes.green),
- storedFamily('red', 'Red', '#ff9e9a', y2kPalettes.red),
- storedFamily('yellow', 'Yellow', '#ffcc55', y2kPalettes.yellow),
- storedFamily('blue', 'Blue', '#8ecfff', y2kPalettes.blue),
- storedFamily('pink', 'Pink', '#ffa0c8', y2kPalettes.pink),
- storedFamily('purple', 'Purple', '#c0aaff', y2kPalettes.purple),
- storedFamily('cyan', 'Cyan', '#70e8d0', y2kPalettes.cyan),
- storedFamily('orange', 'Orange', '#ffaa66', y2kPalettes.orange),
- storedFamily('teal', 'Teal', '#78e0b0', y2kPalettes.teal),
];
const butterFamilies = [
@@ -403,7 +475,7 @@ export const THEME_REFERENCES: ThemeReference[] = [
name: 'Y2K',
description: 'Stored high-chroma pastel pop ramps.',
referenceKind: 'stored',
- suggestedVibrancy: {oklch: 45, hct: 34, compare: 39},
+ suggestedVibrancy: {oklch: 72, hct: 53, compare: 72},
modes: ['light', 'dark'],
families: y2kFamilies,
},
diff --git a/docs/themes/README.md b/docs/themes/README.md
index 77d7ca52c0..48c356970f 100644
--- a/docs/themes/README.md
+++ b/docs/themes/README.md
@@ -18,6 +18,7 @@ Current records:
- [Gothic](../../packages/themes/gothic/gothic.spec.md) — current
- [Matcha](../../packages/themes/matcha/matcha.spec.md) — current
- [Butter](../../packages/themes/butter/butter.spec.md) — current
+- [Y2K](../../packages/themes/y2k/y2k.spec.md) — current
A theme record sits between system theming architecture and consumer/component
records. It uses one typed `references` list for architecture, design, system,
diff --git a/package.json b/package.json
index 532fb50b04..9052c34ad0 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,8 @@
"check:matcha-palette-refs": "node scripts/generate-matcha-palette-refs.mjs --check",
"generate:butter-palette-refs": "node scripts/generate-butter-palette-refs.mjs",
"check:butter-palette-refs": "node scripts/generate-butter-palette-refs.mjs --check",
+ "generate:y2k-palette-refs": "node scripts/generate-y2k-palette-refs.mjs",
+ "check:y2k-palette-refs": "node scripts/generate-y2k-palette-refs.mjs --check",
"dev": "pnpm -F @astryxdesign/storybook dev",
"test": "vitest run",
"test:watch": "vitest",
@@ -24,7 +26,7 @@
"test:a11y-contract": "playwright test --config playwright.config.ts --project chromium",
"test:docsite-browser": "playwright test --config apps/docsite/playwright.config.ts",
"check:package-boundaries": "node scripts/check-package-boundaries.js",
- "check:repo": "pnpm check:visual-owner && pnpm check:sync && pnpm check:neutral-palette-refs && pnpm check:stone-palette-refs && pnpm check:gothic-palette-refs && pnpm check:matcha-palette-refs && pnpm check:butter-palette-refs && pnpm check:data-tokens && pnpm check:token-docs && pnpm check:knowledge && pnpm check:package-boundaries && pnpm check:changesets && pnpm check:demo-media && pnpm check:executable-bits && pnpm check:cli-structure && pnpm check:use-client && pnpm check:portable-scripts && pnpm check:i18n-runtime && pnpm check:i18n-catalog && pnpm check:cldr-weekdays && pnpm check:fixtures && pnpm check:setup-contract",
+ "check:repo": "pnpm check:visual-owner && pnpm check:sync && pnpm check:neutral-palette-refs && pnpm check:stone-palette-refs && pnpm check:gothic-palette-refs && pnpm check:matcha-palette-refs && pnpm check:butter-palette-refs && pnpm check:y2k-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/y2k/palette.config.json b/packages/cli/assets/templates/themes/y2k/palette.config.json
new file mode 100644
index 0000000000..ca931dbca4
--- /dev/null
+++ b/packages/cli/assets/templates/themes/y2k/palette.config.json
@@ -0,0 +1,166 @@
+{
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 72,
+ "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": "Y2K Neutral",
+ "seed": "#fff6ed",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 15,
+ "color": "#2d241b",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 40,
+ "color": "#675d52",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#d1c5b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 95,
+ "color": "#fff6ed",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 5,
+ "color": "#0e0f1a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#16182b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2238",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 35,
+ "color": "#4a4f6b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a6acd6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#edeffc",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "accent",
+ "name": "Periwinkle",
+ "seed": "#cccffa",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Red",
+ "seed": "#ff6f7a",
+ "anchors": []
+ },
+ {
+ "id": "orange",
+ "name": "Orange",
+ "seed": "#ff9f4a",
+ "anchors": []
+ },
+ {
+ "id": "yellow",
+ "name": "Yellow",
+ "seed": "#ffd34f",
+ "anchors": []
+ },
+ {
+ "id": "green",
+ "name": "Green",
+ "seed": "#c5e17a",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Teal",
+ "seed": "#48c99a",
+ "anchors": []
+ },
+ {
+ "id": "cyan",
+ "name": "Cyan",
+ "seed": "#42d4d0",
+ "anchors": []
+ },
+ {
+ "id": "blue",
+ "name": "Blue",
+ "seed": "#00a8ff",
+ "anchors": []
+ },
+ {
+ "id": "purple",
+ "name": "Purple",
+ "seed": "#a589ff",
+ "anchors": []
+ },
+ {
+ "id": "pink",
+ "name": "Pink",
+ "seed": "#ff72b6",
+ "anchors": []
+ }
+ ]
+}
diff --git a/packages/cli/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts b/packages/cli/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts
new file mode 100644
index 0000000000..6def40684a
--- /dev/null
+++ b/packages/cli/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts
@@ -0,0 +1,54 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+// Generated from the committed full palette for the stops used by Y2K's
+// theme source. Regenerate with `pnpm generate:y2k-palette-refs`.
+// Keep the complete palette available for authoring and audits without
+// making consumers pay for unused palette stops.
+// prettier-ignore
+export const y2kPaletteRefs = {
+ purple: {
+ light: {25: '#431a88', 40: '#663ebd', 75: '#bbaaff', 85: '#d5cdff'},
+ dark: {15: '#2a1159', 75: '#bbaaff', 85: '#d5cdff'},
+ },
+ green: {
+ light: {30: '#3f4e00', 40: '#546800', 75: '#b5d360', 80: '#c5e17a'},
+ dark: {20: '#2a3600', 65: '#95b041', 75: '#b5d263', 80: '#c5e17a'},
+ },
+ neutral: {
+ light: {15: '#2d241b', 20: '#382e24', 30: '#4f453b', 40: '#675d52', 80: '#d1c5b8', 85: '#dfd5c9', 90: '#f1e6db', 95: '#fff6ed', 100: '#ffffff'},
+ dark: {0: '#000000', 5: '#0e0f1a', 10: '#16182b', 20: '#1f2238', 25: '#2c3048', 35: '#4a4f6b', 45: '#636889', 70: '#a6acd6', 85: '#d0d4eb', 90: '#dfe2f3', 95: '#edeffc'},
+ },
+ orange: {
+ light: {30: '#703400', 40: '#904800', 80: '#ffb477', 85: '#ffc89d'},
+ dark: {15: '#411800', 80: '#ffb477', 85: '#ffc89d'},
+ },
+ blue: {
+ light: {20: '#003454', 40: '#00649b', 75: '#70c1ff', 85: '#addbff'},
+ dark: {20: '#003454', 75: '#70c1ff', 85: '#addbff'},
+ },
+ red: {
+ light: {30: '#880023', 35: '#9d002a', 75: '#ff969a', 85: '#ffc3c3'},
+ dark: {20: '#610016', 75: '#ff969a', 85: '#ffc3c3'},
+ },
+ yellow: {
+ light: {30: '#584400', 40: '#745b00', 85: '#f9d059', 90: '#ffe08a'},
+ dark: {20: '#3d2e00', 70: '#d0a601', 85: '#f3d172', 90: '#fde08f'},
+ },
+ teal: {
+ light: {30: '#00553b', 40: '#007050', 80: '#81dcb6', 90: '#b6f2d7'},
+ dark: {15: '#002f1e', 70: '#5bc29a', 80: '#8ed9b9', 85: '#a6e5c9'},
+ },
+ accent: {
+ light: {80: '#cccffa'},
+ },
+ pink: {
+ light: {30: '#82004f', 80: '#ffa8cd', 85: '#ffbfd9'},
+ dark: {20: '#5d0037', 80: '#ffa8cd', 85: '#ffbfd9'},
+ },
+ cyan: {
+ light: {30: '#005250', 80: '#73dbd7', 90: '#b2f0ed'},
+ dark: {15: '#002d2c', 80: '#84d8d4', 90: '#baeeec'},
+ },
+} as const;
+
+export default y2kPaletteRefs;
diff --git a/packages/cli/assets/templates/themes/y2k/y2kPalettes.generated.receipt.json b/packages/cli/assets/templates/themes/y2k/y2kPalettes.generated.receipt.json
new file mode 100644
index 0000000000..7cc2506251
--- /dev/null
+++ b/packages/cli/assets/templates/themes/y2k/y2kPalettes.generated.receipt.json
@@ -0,0 +1,872 @@
+{
+ "schemaVersion": 1,
+ "recipe": "astryx-oklch-v1",
+ "generatorVersion": "palette-generator-v1",
+ "candidateFormatVersion": "palette-typescript-v1",
+ "candidateSha256": "c2c92ea97651d25b119f2f92f26d6e59b3d26bce68e93a00dedf9001e2ccc68f",
+ "preview": {
+ "version": "palette-preview-v1",
+ "sha256": "0d8677af0609f0b32afa97d3e5e9d263d1e1050afc5fb2e6a4e48c56527166c1"
+ },
+ "request": {
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 72,
+ "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": "Y2K Neutral",
+ "seed": "#fff6ed",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 15,
+ "color": "#2d241b",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 40,
+ "color": "#675d52",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#d1c5b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 95,
+ "color": "#fff6ed",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 5,
+ "color": "#0e0f1a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#16182b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2238",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 35,
+ "color": "#4a4f6b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a6acd6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#edeffc",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "accent",
+ "name": "Periwinkle",
+ "seed": "#cccffa",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Red",
+ "seed": "#ff6f7a",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "orange",
+ "name": "Orange",
+ "seed": "#ff9f4a",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "yellow",
+ "name": "Yellow",
+ "seed": "#ffd34f",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "green",
+ "name": "Green",
+ "seed": "#c5e17a",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Teal",
+ "seed": "#48c99a",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "cyan",
+ "name": "Cyan",
+ "seed": "#42d4d0",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "blue",
+ "name": "Blue",
+ "seed": "#00a8ff",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "purple",
+ "name": "Purple",
+ "seed": "#a589ff",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "pink",
+ "name": "Pink",
+ "seed": "#ff72b6",
+ "kind": "chromatic",
+ "anchors": []
+ }
+ ]
+ },
+ "diagnostics": {
+ "families": {
+ "neutral": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.7094097662383887,
+ "maximumAdjacentDeltaE": 17.80240344462996,
+ "maximumHueDrift": 10.715070091410723,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 15,
+ "color": "#2d241b",
+ "policy": "exact",
+ "generatedColor": "#2d241b",
+ "deltaE": 0
+ },
+ {
+ "mode": "light",
+ "stop": 40,
+ "color": "#675d52",
+ "policy": "exact",
+ "generatedColor": "#675d52",
+ "deltaE": 0
+ },
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#d1c5b8",
+ "policy": "exact",
+ "generatedColor": "#d1c5b8",
+ "deltaE": 0
+ },
+ {
+ "mode": "light",
+ "stop": 95,
+ "color": "#fff6ed",
+ "policy": "exact",
+ "generatedColor": "#fff6ed",
+ "deltaE": 0
+ }
+ ]
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.097456744882365,
+ "maximumAdjacentDeltaE": 17.473009311118187,
+ "maximumHueDrift": 154.37573698243727,
+ "hueIdentityRisk": "yellow-to-brown",
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 5,
+ "color": "#0e0f1a",
+ "policy": "exact",
+ "generatedColor": "#0e0f1a",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#16182b",
+ "policy": "exact",
+ "generatedColor": "#16182b",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2238",
+ "policy": "exact",
+ "generatedColor": "#1f2238",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 35,
+ "color": "#4a4f6b",
+ "policy": "exact",
+ "generatedColor": "#4a4f6b",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a6acd6",
+ "policy": "exact",
+ "generatedColor": "#a6acd6",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#edeffc",
+ "policy": "exact",
+ "generatedColor": "#edeffc",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "accent": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.0670015525719916,
+ "maximumAdjacentDeltaE": 19.608202933100333,
+ "maximumHueDrift": 3.944707439084482,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact",
+ "generatedColor": "#cccffa",
+ "deltaE": 0
+ }
+ ]
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.0670015525719916,
+ "maximumAdjacentDeltaE": 19.138331195398898,
+ "maximumHueDrift": 4.221445644033679,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact",
+ "generatedColor": "#cccffa",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "red": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.22930681993813,
+ "maximumAdjacentDeltaE": 19.694235227613888,
+ "maximumHueDrift": 3.098232729028041,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.143184771350663,
+ "maximumAdjacentDeltaE": 19.694235227613888,
+ "maximumHueDrift": 3.038241972299886,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "orange": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.2746171124590715,
+ "maximumAdjacentDeltaE": 18.59918172833274,
+ "maximumHueDrift": 18.262856662538297,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.200841331349473,
+ "maximumAdjacentDeltaE": 18.59918172833274,
+ "maximumHueDrift": 18.262856662538297,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "yellow": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.21766838334021,
+ "maximumAdjacentDeltaE": 18.108804228656158,
+ "maximumHueDrift": 8.277463562561138,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.21766838334021,
+ "maximumAdjacentDeltaE": 18.108804228656158,
+ "maximumHueDrift": 8.277463562561138,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "green": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.813896899932746,
+ "maximumAdjacentDeltaE": 18.285555847029293,
+ "maximumHueDrift": 2.0212572628068415,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact",
+ "generatedColor": "#c5e17a",
+ "deltaE": 0
+ }
+ ]
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.074317635406035,
+ "maximumAdjacentDeltaE": 18.285555847029293,
+ "maximumHueDrift": 2.47101617952535,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact",
+ "generatedColor": "#c5e17a",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "teal": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.073753220031362,
+ "maximumAdjacentDeltaE": 18.51406506466185,
+ "maximumHueDrift": 3.2006309423411494,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.129308135657254,
+ "maximumAdjacentDeltaE": 18.51406506466185,
+ "maximumHueDrift": 3.2006309423411494,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "cyan": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.153111085482815,
+ "maximumAdjacentDeltaE": 18.342189976833094,
+ "maximumHueDrift": 1.0719487972921797,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.153111085482815,
+ "maximumAdjacentDeltaE": 18.342189976833094,
+ "maximumHueDrift": 1.279065119751749,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "blue": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.145720742183582,
+ "maximumAdjacentDeltaE": 18.56573438476547,
+ "maximumHueDrift": 6.358281000663965,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.145720742183582,
+ "maximumAdjacentDeltaE": 18.56573438476547,
+ "maximumHueDrift": 6.358281000663965,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "purple": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.210187504380509,
+ "maximumAdjacentDeltaE": 20.153582458277334,
+ "maximumHueDrift": 1.6035632553639516,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.149104038826761,
+ "maximumAdjacentDeltaE": 19.60669329036918,
+ "maximumHueDrift": 1.4953032794496721,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "pink": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.216332639517304,
+ "maximumAdjacentDeltaE": 19.83461373324314,
+ "maximumHueDrift": 2.414658212370682,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.231584312472901,
+ "maximumAdjacentDeltaE": 19.83461373324314,
+ "maximumHueDrift": 2.723229784222667,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ }
+ },
+ "coordination": [
+ {
+ "mode": "light",
+ "stop": 50,
+ "closestFamilies": [
+ "Periwinkle",
+ "Purple"
+ ],
+ "minimumFamilyDeltaE": 4.131386051087785,
+ "strongestFamily": "Pink",
+ "weakestFamily": "Cyan",
+ "chromaRatio": 2.248680832740881
+ },
+ {
+ "mode": "dark",
+ "stop": 50,
+ "closestFamilies": [
+ "Periwinkle",
+ "Purple"
+ ],
+ "minimumFamilyDeltaE": 3.582346320738832,
+ "strongestFamily": "Pink",
+ "weakestFamily": "Cyan",
+ "chromaRatio": 1.9088960897373277
+ }
+ ]
+ }
+}
diff --git a/packages/cli/assets/templates/themes/y2k/y2kPalettes.generated.ts b/packages/cli/assets/templates/themes/y2k/y2kPalettes.generated.ts
new file mode 100644
index 0000000000..2b202e0226
--- /dev/null
+++ b/packages/cli/assets/templates/themes/y2k/y2kPalettes.generated.ts
@@ -0,0 +1,550 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+// Generated by astryx-oklch-v1. Review before committing.
+export const black = '#000000' as const;
+export const white = '#ffffff' as const;
+
+// prettier-ignore
+export const palette = {
+ "neutral": {
+ "name": "Y2K Neutral",
+ "light": {
+ "0": "#000000",
+ "5": "#15100b",
+ "10": "#211a13",
+ "15": "#2d241b",
+ "20": "#382e24",
+ "25": "#433930",
+ "30": "#4f453b",
+ "35": "#5a5146",
+ "40": "#675d52",
+ "45": "#73695e",
+ "50": "#7f766a",
+ "55": "#8d8275",
+ "60": "#9a8f82",
+ "65": "#a99c8e",
+ "70": "#b6aa9c",
+ "75": "#c4b8a9",
+ "80": "#d1c5b8",
+ "85": "#dfd5c9",
+ "90": "#f1e6db",
+ "95": "#fff6ed",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#0e0f1a",
+ "10": "#16182b",
+ "15": "#1a1d31",
+ "20": "#1f2238",
+ "25": "#2c3048",
+ "30": "#3d415b",
+ "35": "#4a4f6b",
+ "40": "#565b79",
+ "45": "#636889",
+ "50": "#6f7599",
+ "55": "#7c83a9",
+ "60": "#8a91b8",
+ "65": "#989fc8",
+ "70": "#a6acd6",
+ "75": "#b5badd",
+ "80": "#c2c7e4",
+ "85": "#d0d4eb",
+ "90": "#dfe2f3",
+ "95": "#edeffc",
+ "100": "#ffffff"
+ }
+ },
+ "accent": {
+ "name": "Periwinkle",
+ "light": {
+ "0": "#000000",
+ "5": "#0e0634",
+ "10": "#180d4a",
+ "15": "#21155e",
+ "20": "#2a1e71",
+ "25": "#342883",
+ "30": "#3e3395",
+ "35": "#493fa6",
+ "40": "#544bb6",
+ "45": "#5f58c6",
+ "50": "#6b65d5",
+ "55": "#7772e3",
+ "60": "#8482f1",
+ "65": "#9595fc",
+ "70": "#a7a9fd",
+ "75": "#babefb",
+ "80": "#cccffa",
+ "85": "#daddfa",
+ "90": "#e5e7fc",
+ "95": "#f1f1fe",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#0e092f",
+ "10": "#171143",
+ "15": "#211a56",
+ "20": "#2a2367",
+ "25": "#342e79",
+ "30": "#3e3989",
+ "35": "#49449a",
+ "40": "#5450a9",
+ "45": "#605db9",
+ "50": "#6b69c7",
+ "55": "#7877d5",
+ "60": "#8586e3",
+ "65": "#9698ee",
+ "70": "#a7aaf9",
+ "75": "#babefb",
+ "80": "#cccffa",
+ "85": "#daddfa",
+ "90": "#e5e7fc",
+ "95": "#f1f1fe",
+ "100": "#ffffff"
+ }
+ },
+ "red": {
+ "name": "Red",
+ "light": {
+ "0": "#000000",
+ "5": "#2b0004",
+ "10": "#3d0009",
+ "15": "#4f000f",
+ "20": "#610016",
+ "25": "#75001c",
+ "30": "#880023",
+ "35": "#9d002a",
+ "40": "#b20031",
+ "45": "#c70039",
+ "50": "#d91b44",
+ "55": "#e83250",
+ "60": "#f7465e",
+ "65": "#ff5f6f",
+ "70": "#ff7d85",
+ "75": "#ff969a",
+ "80": "#ffadaf",
+ "85": "#ffc3c3",
+ "90": "#ffd7d7",
+ "95": "#ffebeb",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#2b0004",
+ "10": "#3d0009",
+ "15": "#4f000f",
+ "20": "#610016",
+ "25": "#75001c",
+ "30": "#880023",
+ "35": "#9c022b",
+ "40": "#ad1835",
+ "45": "#bd2940",
+ "50": "#cc384c",
+ "55": "#db4859",
+ "60": "#ea5866",
+ "65": "#f76874",
+ "70": "#ff7d85",
+ "75": "#ff969a",
+ "80": "#ffadaf",
+ "85": "#ffc3c3",
+ "90": "#ffd7d7",
+ "95": "#ffebeb",
+ "100": "#ffffff"
+ }
+ },
+ "orange": {
+ "name": "Orange",
+ "light": {
+ "0": "#000000",
+ "5": "#240600",
+ "10": "#320f00",
+ "15": "#411800",
+ "20": "#502100",
+ "25": "#5f2a00",
+ "30": "#703400",
+ "35": "#803e00",
+ "40": "#904800",
+ "45": "#a15300",
+ "50": "#b05f00",
+ "55": "#c26a00",
+ "60": "#d47500",
+ "65": "#e77f00",
+ "70": "#fa8b00",
+ "75": "#ff9e48",
+ "80": "#ffb477",
+ "85": "#ffc89d",
+ "90": "#ffdbbf",
+ "95": "#ffede0",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#240600",
+ "10": "#320f00",
+ "15": "#411800",
+ "20": "#502100",
+ "25": "#5f2a00",
+ "30": "#703400",
+ "35": "#803e00",
+ "40": "#904800",
+ "45": "#a15300",
+ "50": "#b05f00",
+ "55": "#c26a00",
+ "60": "#d47500",
+ "65": "#e77f00",
+ "70": "#f48f2c",
+ "75": "#ff9e48",
+ "80": "#ffb477",
+ "85": "#ffc89d",
+ "90": "#ffdbbf",
+ "95": "#ffede0",
+ "100": "#ffffff"
+ }
+ },
+ "yellow": {
+ "name": "Yellow",
+ "light": {
+ "0": "#000000",
+ "5": "#190f00",
+ "10": "#251a00",
+ "15": "#312400",
+ "20": "#3d2e00",
+ "25": "#4a3900",
+ "30": "#584400",
+ "35": "#664f00",
+ "40": "#745b00",
+ "45": "#836700",
+ "50": "#927300",
+ "55": "#a17f00",
+ "60": "#b08c00",
+ "65": "#c09900",
+ "70": "#d0a600",
+ "75": "#e0b300",
+ "80": "#eec130",
+ "85": "#f9d059",
+ "90": "#ffe08a",
+ "95": "#fff0c7",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#190f00",
+ "10": "#251a00",
+ "15": "#312400",
+ "20": "#3d2e00",
+ "25": "#4a3900",
+ "30": "#584400",
+ "35": "#664f00",
+ "40": "#745b00",
+ "45": "#836700",
+ "50": "#927300",
+ "55": "#a17f00",
+ "60": "#b08c00",
+ "65": "#c09900",
+ "70": "#d0a601",
+ "75": "#dcb436",
+ "80": "#e8c255",
+ "85": "#f3d172",
+ "90": "#fde08f",
+ "95": "#fff0c7",
+ "100": "#ffffff"
+ }
+ },
+ "green": {
+ "name": "Green",
+ "light": {
+ "0": "#000000",
+ "5": "#0d1400",
+ "10": "#171f00",
+ "15": "#212a00",
+ "20": "#2a3600",
+ "25": "#344200",
+ "30": "#3f4e00",
+ "35": "#495b00",
+ "40": "#546800",
+ "45": "#5f7500",
+ "50": "#6a8300",
+ "55": "#769100",
+ "60": "#83a013",
+ "65": "#93b02e",
+ "70": "#a4c246",
+ "75": "#b5d360",
+ "80": "#c5e17a",
+ "85": "#d4ec96",
+ "90": "#dff3b2",
+ "95": "#ecfacd",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#0d1400",
+ "10": "#171f00",
+ "15": "#212a00",
+ "20": "#2a3600",
+ "25": "#344200",
+ "30": "#3f4e00",
+ "35": "#495b00",
+ "40": "#546800",
+ "45": "#5f7500",
+ "50": "#6b8212",
+ "55": "#778f27",
+ "60": "#859f35",
+ "65": "#95b041",
+ "70": "#a5c251",
+ "75": "#b5d263",
+ "80": "#c5e17a",
+ "85": "#d3ec96",
+ "90": "#e0f3b4",
+ "95": "#ecf9d1",
+ "100": "#ffffff"
+ }
+ },
+ "teal": {
+ "name": "Teal",
+ "light": {
+ "0": "#000000",
+ "5": "#00170c",
+ "10": "#002315",
+ "15": "#002f1e",
+ "20": "#003b28",
+ "25": "#004731",
+ "30": "#00553b",
+ "35": "#006246",
+ "40": "#007050",
+ "45": "#007e5b",
+ "50": "#008d65",
+ "55": "#009b70",
+ "60": "#00ab7c",
+ "65": "#0ab987",
+ "70": "#42c696",
+ "75": "#64d1a6",
+ "80": "#81dcb6",
+ "85": "#9ce7c6",
+ "90": "#b6f2d7",
+ "95": "#cffde8",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#00170c",
+ "10": "#002315",
+ "15": "#002f1e",
+ "20": "#003b28",
+ "25": "#004731",
+ "30": "#00553b",
+ "35": "#006246",
+ "40": "#007050",
+ "45": "#007e5b",
+ "50": "#008d65",
+ "55": "#009b70",
+ "60": "#23a97d",
+ "65": "#40b68b",
+ "70": "#5bc29a",
+ "75": "#75cea9",
+ "80": "#8ed9b9",
+ "85": "#a6e5c9",
+ "90": "#bdf0d9",
+ "95": "#d4fce9",
+ "100": "#ffffff"
+ }
+ },
+ "cyan": {
+ "name": "Cyan",
+ "light": {
+ "0": "#000000",
+ "5": "#001615",
+ "10": "#002221",
+ "15": "#002d2c",
+ "20": "#003938",
+ "25": "#004544",
+ "30": "#005250",
+ "35": "#005f5d",
+ "40": "#006d6b",
+ "45": "#007b78",
+ "50": "#008986",
+ "55": "#009794",
+ "60": "#00a6a3",
+ "65": "#00b5b1",
+ "70": "#00c4c0",
+ "75": "#47d0cc",
+ "80": "#73dbd7",
+ "85": "#95e5e2",
+ "90": "#b2f0ed",
+ "95": "#cdfcf9",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#001615",
+ "10": "#002221",
+ "15": "#002d2c",
+ "20": "#003938",
+ "25": "#004544",
+ "30": "#005250",
+ "35": "#005f5d",
+ "40": "#006d6b",
+ "45": "#007b78",
+ "50": "#008986",
+ "55": "#009794",
+ "60": "#00a6a3",
+ "65": "#00b5b1",
+ "70": "#39c2be",
+ "75": "#63cdc9",
+ "80": "#84d8d4",
+ "85": "#a1e3e0",
+ "90": "#baeeec",
+ "95": "#d3faf8",
+ "100": "#ffffff"
+ }
+ },
+ "blue": {
+ "name": "Blue",
+ "light": {
+ "0": "#000000",
+ "5": "#001226",
+ "10": "#001e35",
+ "15": "#002844",
+ "20": "#003454",
+ "25": "#003f65",
+ "30": "#004b76",
+ "35": "#005788",
+ "40": "#00649b",
+ "45": "#0071ae",
+ "50": "#007ec1",
+ "55": "#008bd5",
+ "60": "#0099e9",
+ "65": "#00a7fd",
+ "70": "#49b4ff",
+ "75": "#70c1ff",
+ "80": "#90ceff",
+ "85": "#addbff",
+ "90": "#c9e7ff",
+ "95": "#e4f3ff",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#001226",
+ "10": "#001e35",
+ "15": "#002844",
+ "20": "#003454",
+ "25": "#003f65",
+ "30": "#004b76",
+ "35": "#005788",
+ "40": "#00649b",
+ "45": "#0071ae",
+ "50": "#007ec1",
+ "55": "#008bd5",
+ "60": "#0099e9",
+ "65": "#00a7fd",
+ "70": "#49b4ff",
+ "75": "#70c1ff",
+ "80": "#90ceff",
+ "85": "#addbff",
+ "90": "#c9e7ff",
+ "95": "#e4f3ff",
+ "100": "#ffffff"
+ }
+ },
+ "purple": {
+ "name": "Purple",
+ "light": {
+ "0": "#000000",
+ "5": "#150136",
+ "10": "#21014e",
+ "15": "#2c0662",
+ "20": "#370f75",
+ "25": "#431a88",
+ "30": "#4e259a",
+ "35": "#5a31ac",
+ "40": "#663ebd",
+ "45": "#724bcd",
+ "50": "#7e58dc",
+ "55": "#8a66ea",
+ "60": "#9775f7",
+ "65": "#a385ff",
+ "70": "#af98ff",
+ "75": "#bbaaff",
+ "80": "#c8bcff",
+ "85": "#d5cdff",
+ "90": "#e3deff",
+ "95": "#f1eeff",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#140531",
+ "10": "#200946",
+ "15": "#2a1159",
+ "20": "#361a6b",
+ "25": "#41247d",
+ "30": "#4c2f8e",
+ "35": "#583a9f",
+ "40": "#6446af",
+ "45": "#7053be",
+ "50": "#7c5fcd",
+ "55": "#886ddb",
+ "60": "#957be9",
+ "65": "#a289f5",
+ "70": "#af98ff",
+ "75": "#bbaaff",
+ "80": "#c8bcff",
+ "85": "#d5cdff",
+ "90": "#e3deff",
+ "95": "#f1eeff",
+ "100": "#ffffff"
+ }
+ },
+ "pink": {
+ "name": "Pink",
+ "light": {
+ "0": "#000000",
+ "5": "#290014",
+ "10": "#3a0020",
+ "15": "#4b002b",
+ "20": "#5d0037",
+ "25": "#6f0043",
+ "30": "#82004f",
+ "35": "#96005c",
+ "40": "#aa0069",
+ "45": "#be0077",
+ "50": "#ce1e83",
+ "55": "#dd3390",
+ "60": "#ec469d",
+ "65": "#f958aa",
+ "70": "#ff73b6",
+ "75": "#ff8fc2",
+ "80": "#ffa8cd",
+ "85": "#ffbfd9",
+ "90": "#ffd5e6",
+ "95": "#ffeaf2",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#290014",
+ "10": "#3a0020",
+ "15": "#4b002b",
+ "20": "#5d0037",
+ "25": "#6f0043",
+ "30": "#82004f",
+ "35": "#94065c",
+ "40": "#a41968",
+ "45": "#b42975",
+ "50": "#c33982",
+ "55": "#d2488e",
+ "60": "#e0579b",
+ "65": "#ee67a9",
+ "70": "#fa78b6",
+ "75": "#ff8fc2",
+ "80": "#ffa8cd",
+ "85": "#ffbfd9",
+ "90": "#ffd5e6",
+ "95": "#ffeaf2",
+ "100": "#ffffff"
+ }
+ }
+} as const;
+
+export default palette;
diff --git a/packages/cli/assets/templates/themes/y2k/y2kPalettes.ts b/packages/cli/assets/templates/themes/y2k/y2kPalettes.ts
new file mode 100644
index 0000000000..198ceb2aa5
--- /dev/null
+++ b/packages/cli/assets/templates/themes/y2k/y2kPalettes.ts
@@ -0,0 +1,257 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/** Y2K's original mode-independent palette API. */
+export const y2kPalettes = {
+ neutral: {
+ hue: 75,
+ chroma: 8,
+ 0: '#000000',
+ 5: '#190f00',
+ 10: '#221a10',
+ 15: '#2d241b',
+ 20: '#382f25',
+ 25: '#433a30',
+ 30: '#4f453b',
+ 35: '#5b5146',
+ 40: '#675d52',
+ 45: '#73695e',
+ 50: '#80756a',
+ 55: '#8d8276',
+ 60: '#9a8f83',
+ 65: '#a79c90',
+ 70: '#b5a99d',
+ 75: '#c3b7ab',
+ 80: '#d1c5b8',
+ 85: '#dfd2c6',
+ 90: '#ede0d4',
+ 95: '#fbefe2',
+ 100: '#ffffff',
+ },
+ green: {
+ hue: 120,
+ chroma: 60,
+ 0: '#000000',
+ 5: '#061800',
+ 10: '#132200',
+ 15: '#152d00',
+ 20: '#173900',
+ 25: '#1e4500',
+ 30: '#285100',
+ 35: '#355d00',
+ 40: '#426900',
+ 45: '#4f7600',
+ 50: '#5c830b',
+ 55: '#69901d',
+ 60: '#779d2c',
+ 65: '#84aa39',
+ 70: '#92b847',
+ 75: '#a0c654',
+ 80: '#aed461',
+ 85: '#bce26e',
+ 90: '#caf07b',
+ 95: '#d9fe89',
+ 100: '#ffffff',
+ },
+ red: {
+ hue: 25,
+ chroma: 55,
+ 0: '#000000',
+ 5: '#480000',
+ 10: '#540000',
+ 15: '#620002',
+ 20: '#700012',
+ 25: '#7f001b',
+ 30: '#8e1126',
+ 35: '#9c2330',
+ 40: '#ab313b',
+ 45: '#ba3f47',
+ 50: '#c94d52',
+ 55: '#d95b5e',
+ 60: '#e8686b',
+ 65: '#f87677',
+ 70: '#ff8787',
+ 75: '#ff9d9b',
+ 80: '#ffb2af',
+ 85: '#ffc6c3',
+ 90: '#ffd9d7',
+ 95: '#ffeceb',
+ 100: '#ffffff',
+ },
+ yellow: {
+ hue: 85,
+ chroma: 65,
+ 0: '#000000',
+ 5: '#270c00',
+ 10: '#301800',
+ 15: '#3b2200',
+ 20: '#472c00',
+ 25: '#533700',
+ 30: '#604200',
+ 35: '#6d4d00',
+ 40: '#7b5900',
+ 45: '#896500',
+ 50: '#977100',
+ 55: '#a67e00',
+ 60: '#b58b01',
+ 65: '#c39819',
+ 70: '#d2a52a',
+ 75: '#e2b239',
+ 80: '#f1c047',
+ 85: '#ffcd55',
+ 90: '#ffde9b',
+ 95: '#ffeecf',
+ 100: '#ffffff',
+ },
+ blue: {
+ hue: 250,
+ chroma: 40,
+ 0: '#000000',
+ 5: '#001939',
+ 10: '#002244',
+ 15: '#002c4d',
+ 20: '#003759',
+ 25: '#004266',
+ 30: '#004e74',
+ 35: '#005a83',
+ 40: '#006693',
+ 45: '#0073a3',
+ 50: '#0080b4',
+ 55: '#008ec4',
+ 60: '#0e9bd2',
+ 65: '#2fa8e0',
+ 70: '#45b6ef',
+ 75: '#57c3fd',
+ 80: '#7ed0ff',
+ 85: '#a3dbff',
+ 90: '#c4e7ff',
+ 95: '#e1f3ff',
+ 100: '#ffffff',
+ },
+ pink: {
+ hue: 350,
+ chroma: 45,
+ 0: '#000000',
+ 5: '#3d001d',
+ 10: '#490027',
+ 15: '#560032',
+ 20: '#64003d',
+ 25: '#711248',
+ 30: '#7f2154',
+ 35: '#8c2f60',
+ 40: '#9a3c6c',
+ 45: '#a84979',
+ 50: '#b75685',
+ 55: '#c56392',
+ 60: '#d371a0',
+ 65: '#e27ead',
+ 70: '#f18bbb',
+ 75: '#ff99c8',
+ 80: '#ffaed3',
+ 85: '#ffc3de',
+ 90: '#ffd7e9',
+ 95: '#ffebf4',
+ 100: '#ffffff',
+ },
+ purple: {
+ hue: 300,
+ chroma: 40,
+ 0: '#000000',
+ 5: '#020840',
+ 10: '#11144b',
+ 15: '#1f1e57',
+ 20: '#2c2864',
+ 25: '#393370',
+ 30: '#453e7d',
+ 35: '#524a8a',
+ 40: '#5f5697',
+ 45: '#6c62a4',
+ 50: '#796eb2',
+ 55: '#867bc0',
+ 60: '#9387ce',
+ 65: '#a194dc',
+ 70: '#afa2ea',
+ 75: '#bdaff8',
+ 80: '#cbbeff',
+ 85: '#d9ceff',
+ 90: '#e6deff',
+ 95: '#f3eeff',
+ 100: '#ffffff',
+ },
+ cyan: {
+ hue: 185,
+ chroma: 35,
+ 0: '#000000',
+ 5: '#001e14',
+ 10: '#00261f',
+ 15: '#003029',
+ 20: '#003b34',
+ 25: '#00473f',
+ 30: '#00534a',
+ 35: '#005f56',
+ 40: '#006c62',
+ 45: '#00796f',
+ 50: '#00867b',
+ 55: '#0f9488',
+ 60: '#29a195',
+ 65: '#3bafa2',
+ 70: '#4cbcb0',
+ 75: '#5bcabd',
+ 80: '#6ad8cb',
+ 85: '#79e7d9',
+ 90: '#87f5e7',
+ 95: '#a6fff5',
+ 100: '#ffffff',
+ },
+ orange: {
+ hue: 60,
+ chroma: 60,
+ 0: '#000000',
+ 5: '#340000',
+ 10: '#420500',
+ 15: '#520b00',
+ 20: '#601700',
+ 25: '#6d2400',
+ 30: '#7b3000',
+ 35: '#893c00',
+ 40: '#984800',
+ 45: '#a75409',
+ 50: '#b66019',
+ 55: '#c56d26',
+ 60: '#d47a33',
+ 65: '#e48740',
+ 70: '#f3944c',
+ 75: '#ffa25c',
+ 80: '#ffb682',
+ 85: '#ffc9a3',
+ 90: '#ffdbc3',
+ 95: '#ffede1',
+ 100: '#ffffff',
+ },
+ teal: {
+ hue: 165,
+ chroma: 30,
+ 0: '#000000',
+ 5: '#001d00',
+ 10: '#00240f',
+ 15: '#002f1a',
+ 20: '#003a24',
+ 25: '#00462f',
+ 30: '#00513a',
+ 35: '#115e45',
+ 40: '#226a51',
+ 45: '#30775d',
+ 50: '#3d8469',
+ 55: '#4a9175',
+ 60: '#589e82',
+ 65: '#65ab8f',
+ 70: '#72b99c',
+ 75: '#7fc7a9',
+ 80: '#8dd5b7',
+ 85: '#9be3c5',
+ 90: '#a9f2d3',
+ 95: '#b6ffe1',
+ 100: '#ffffff',
+ },
+} as const;
+
+export default y2kPalettes;
diff --git a/packages/cli/assets/templates/themes/y2k/y2kTheme.ts b/packages/cli/assets/templates/themes/y2k/y2kTheme.ts
index 1994eedf70..f1b4be85e1 100644
--- a/packages/cli/assets/templates/themes/y2k/y2kTheme.ts
+++ b/packages/cli/assets/templates/themes/y2k/y2kTheme.ts
@@ -4,39 +4,53 @@
* Y2K Theme
*
* A bubbly, playful pop theme inspired by early 2000s aesthetics.
- * Periwinkle body (#CCCFFA), charcoal accent, Poppins for body/headings, and
- * Crimson Text for display sizes.
- * Core neutral: H=75 C=8 (warm cream neutral derived from #FFF6ED)
+ * Colors resolve through named stops from Y2K's reviewed light and dark palette.
+ * The signature periwinkle and neon green remain exact anchors.
*/
import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
import {y2kIconRegistry} from './icons';
+import {y2kPaletteRefs} from './y2kPaletteRefs.generated';
+
+const {
+ accent,
+ blue,
+ cyan,
+ green,
+ neutral,
+ orange,
+ pink,
+ purple,
+ red,
+ teal,
+ yellow,
+} = y2kPaletteRefs;
+
+const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;
const y2kSyntax = defineSyntaxTheme({
name: 'astryx-y2k',
tokens: {
- keyword: ['#615a7a', '#aea6ca'],
- string: ['#586242', '#a5af8b'],
- comment: ['#5e5e5e', '#ababab'],
- number: ['#775843', '#c8a48c'],
- function: ['#39637d', '#87b0cd'],
- type: ['#615a7a', '#aea6ca'],
- variable: ['#5e5e5e', '#ababab'],
- operator: ['#5e5e5e', '#ababab'],
- constant: ['#775843', '#c8a48c'],
- tag: ['#7f5351', '#d19f9d'],
- attribute: ['#6c5c3e', '#bca987'],
- property: ['#3c6755', '#87b5a1'],
- punctuation: ['#5e5e5e', '#ababab'],
- background: ['#FFF6ED', '#190f00'],
- // Diff rows: the muted green/red at 25% in light and 20% in dark keep
- // every token at or above 4.5:1 on the tint. Markers: the tinted text
- // tokens in light (7.3:1 / 7.9:1); in dark those tokens are near-black,
- // so the string and tag colours mark the rows (5.1:1 each).
- added: ['#C5E17A40', '#C5E17A33'],
- removed: ['#FFC5C340', '#FFC5C333'],
- 'added-marker': ['#3a5500', '#a5af8b'],
- 'removed-marker': ['#8b1d24', '#d19f9d'],
+ keyword: [purple.light[40], purple.dark[75]],
+ string: [green.light[40], green.dark[65]],
+ comment: [neutral.light[40], neutral.dark[70]],
+ number: [orange.light[40], orange.dark[80]],
+ function: [blue.light[40], blue.dark[75]],
+ type: [purple.light[40], purple.dark[75]],
+ variable: [neutral.light[40], neutral.dark[70]],
+ operator: [neutral.light[40], neutral.dark[70]],
+ constant: [orange.light[40], orange.dark[80]],
+ tag: [red.light[35], red.dark[75]],
+ attribute: [yellow.light[40], yellow.dark[70]],
+ property: [teal.light[40], teal.dark[70]],
+ punctuation: [neutral.light[40], neutral.dark[70]],
+ background: [neutral.light[95], neutral.dark[5]],
+ // Markers stay readable on diff tints in both modes. The closest pairing
+ // is the dark added marker, which remains above the 4.5:1 text threshold.
+ added: [withAlpha(green.light[80], '40'), withAlpha(green.dark[80], '33')],
+ removed: [withAlpha(red.light[85], '40'), withAlpha(red.dark[85], '33')],
+ 'added-marker': [green.light[30], green.dark[65]],
+ 'removed-marker': [red.light[30], red.dark[75]],
},
});
@@ -138,116 +152,131 @@ export const y2kTheme = defineTheme({
// =========================================================================
// Colors — Y2K pop palette
- // Neutral: H=75 C=8 (warm cream)
- // Accent: charcoal (#292427)
// =========================================================================
- // Core semantic — neutral H=75 C=8 (cream)
- '--color-accent': ['#2d241b', '#EDEFFC'],
- '--color-accent-muted': ['#2d241b14', '#EDEFFC20'],
- '--color-neutral': ['#2d241b10', '#EDEFFC1A'],
- '--color-background-surface': ['#FFFFFF', '#16182b'],
- '--color-background-body': ['#CCCFFA', '#0e0f1a'],
- '--color-overlay': ['#2d241b80', '#0a0b14CC'],
- '--color-overlay-hover': ['#2d241b0D', '#EDEFFC0D'],
- '--color-overlay-pressed': ['#2d241b1A', '#EDEFFC1A'],
- '--color-background-muted': ['#ede0d4', '#1f2238'],
-
- // Text — neutral H=75 (cream)
- '--color-text-primary': ['#2d241b', '#EDEFFC'],
- '--color-text-secondary': ['#675d52', '#a6acd6'],
- '--color-text-disabled': ['#d1c5b8', '#4a4f6b'],
- '--color-text-accent': ['#2d241b', '#EDEFFC'],
- '--color-on-dark': '#FFFFFF',
- '--color-on-light': '#2d241b',
- '--color-on-accent': ['#FFFFFF', '#16182b'],
- '--color-on-success': ['#3a5500', '#1e3200'],
- '--color-on-error': ['#8b1d24', '#5c0008'],
- '--color-on-warning': ['#614400', '#3f2600'],
-
- // Icon — neutral H=75 (cream)
- '--color-icon-accent': ['#2d241b', '#EDEFFC'],
- '--color-icon-primary': ['#2d241b', '#EDEFFC'],
- '--color-icon-secondary': ['#675d52', '#a6acd6'],
- '--color-icon-disabled': ['#d1c5b8', '#4a4f6b'],
-
- // Surface variants — white cards, cream body
- '--color-background-card': ['#FFFFFF', '#16182b'],
- '--color-background-popover': ['#FFFFFF', '#1f2238'],
- '--color-background-inverted': ['#2d241b', '#EDEFFC'],
-
- // Status / Sentiment — same in light and dark
- '--color-success': ['#C5E17A', '#C5E17A'],
- '--color-success-muted': ['#C5E17A', '#C5E17A'],
- '--color-error': ['#FFC5C3', '#FFC5C3'],
- '--color-error-muted': ['#FFC5C3', '#FFC5C3'],
- '--color-warning': ['#FFE08A', '#FFE08A'],
- '--color-warning-muted': ['#FFE08A', '#FFE08A'],
-
- // Bold charcoal borders in light mode (default + card) for the heavy-outline
- // Y2K look. Dark mode unchanged.
- '--color-border': ['#2F292E', '#EDEFFC1A'],
- '--color-border-emphasized': ['#2F292E', '#3a3f5e'],
+ // Core semantic colors
+ '--color-accent': [neutral.light[15], neutral.dark[95]],
+ '--color-accent-muted': [
+ withAlpha(neutral.light[15], '14'),
+ withAlpha(neutral.dark[95], '20'),
+ ],
+ '--color-neutral': [
+ withAlpha(neutral.light[15], '10'),
+ withAlpha(neutral.dark[95], '1A'),
+ ],
+ '--color-background-surface': [neutral.light[100], neutral.dark[10]],
+ '--color-background-body': [accent.light[80], neutral.dark[5]],
+ '--color-overlay': [
+ withAlpha(neutral.light[15], '80'),
+ withAlpha(neutral.dark[5], 'CC'),
+ ],
+ '--color-overlay-hover': [
+ withAlpha(neutral.light[15], '0D'),
+ withAlpha(neutral.dark[95], '0D'),
+ ],
+ '--color-overlay-pressed': [
+ withAlpha(neutral.light[15], '1A'),
+ withAlpha(neutral.dark[95], '1A'),
+ ],
+ '--color-background-muted': [neutral.light[90], neutral.dark[20]],
+
+ // Text
+ '--color-text-primary': [neutral.light[15], neutral.dark[95]],
+ '--color-text-secondary': [neutral.light[40], neutral.dark[70]],
+ '--color-text-disabled': [neutral.light[80], neutral.dark[35]],
+ '--color-text-accent': [neutral.light[15], neutral.dark[95]],
+ '--color-on-dark': neutral.light[100],
+ '--color-on-light': neutral.light[15],
+ '--color-on-accent': [neutral.light[100], neutral.dark[10]],
+ '--color-on-success': [green.light[30], green.dark[20]],
+ '--color-on-error': [red.light[30], red.dark[20]],
+ '--color-on-warning': [yellow.light[30], yellow.dark[20]],
+
+ // Icon
+ '--color-icon-accent': [neutral.light[15], neutral.dark[95]],
+ '--color-icon-primary': [neutral.light[15], neutral.dark[95]],
+ '--color-icon-secondary': [neutral.light[40], neutral.dark[70]],
+ '--color-icon-disabled': [neutral.light[80], neutral.dark[35]],
+
+ // Surface variants
+ '--color-background-card': [neutral.light[100], neutral.dark[10]],
+ '--color-background-popover': [neutral.light[100], neutral.dark[20]],
+ '--color-background-inverted': [neutral.light[15], neutral.dark[95]],
+
+ // Status / sentiment
+ '--color-success': [green.light[80], green.dark[80]],
+ '--color-success-muted': [green.light[80], green.dark[80]],
+ '--color-error': [red.light[85], red.dark[85]],
+ '--color-error-muted': [red.light[85], red.dark[85]],
+ '--color-warning': [yellow.light[90], yellow.dark[90]],
+ '--color-warning-muted': [yellow.light[90], yellow.dark[90]],
+
+ // Bold borders preserve the heavy-outline Y2K look.
+ '--color-border': [neutral.light[20], withAlpha(neutral.dark[95], '1A')],
+ '--color-border-emphasized': [neutral.light[20], neutral.dark[45]],
// Effects
- '--color-skeleton': ['#d1c5b8', '#2a2e47'],
- '--color-shadow': ['#2d241b1A', '#0000004D'],
- '--color-tint-hover': ['#2d241b', '#EDEFFC'],
+ '--color-skeleton': [neutral.light[80], neutral.dark[25]],
+ '--color-shadow': [
+ withAlpha(neutral.light[15], '1A'),
+ withAlpha(neutral.dark[0], '4D'),
+ ],
+ '--color-tint-hover': [neutral.light[15], neutral.dark[95]],
// Typography override
'--text-supporting-size': '12px',
- // Categorical — hand-tuned for equal optical brightness, same light/dark
- '--color-background-green': ['#C5E17A', '#C5E17A'],
- '--color-border-green': ['#B5D16A', '#B5D16A'],
- '--color-icon-green': ['#3a5500', '#1e3200'],
- '--color-text-green': ['#3a5500', '#1e3200'],
-
- '--color-background-red': ['#FFC5C3', '#FFC5C3'],
- '--color-border-red': ['#FF9E9A', '#FF9E9A'],
- '--color-icon-red': ['#8b1d24', '#5c0008'],
- '--color-text-red': ['#8b1d24', '#5c0008'],
-
- '--color-background-yellow': ['#FFE08A', '#FFE08A'],
- '--color-border-yellow': ['#FFCC55', '#FFCC55'],
- '--color-icon-yellow': ['#614400', '#3f2600'],
- '--color-text-yellow': ['#614400', '#3f2600'],
-
- '--color-background-blue': ['#B8E0FF', '#B8E0FF'],
- '--color-border-blue': ['#8ECFFF', '#8ECFFF'],
- '--color-icon-blue': ['#004e74', '#002c4d'],
- '--color-text-blue': ['#004e74', '#002c4d'],
-
- '--color-background-pink': ['#FFC8E0', '#FFC8E0'],
- '--color-border-pink': ['#FFA0C8', '#FFA0C8'],
- '--color-icon-pink': ['#822050', '#580030'],
- '--color-text-pink': ['#822050', '#580030'],
-
- '--color-background-purple': ['#DDD0FF', '#DDD0FF'],
- '--color-border-purple': ['#C0AAFF', '#C0AAFF'],
- '--color-icon-purple': ['#453080', '#201058'],
- '--color-text-purple': ['#453080', '#201058'],
-
- '--color-background-cyan': ['#A8F0E2', '#A8F0E2'],
- '--color-border-cyan': ['#70E8D0', '#70E8D0'],
- '--color-icon-cyan': ['#005548', '#003028'],
- '--color-text-cyan': ['#005548', '#003028'],
-
- '--color-background-orange': ['#FFCCA0', '#FFCCA0'],
- '--color-border-orange': ['#FFAA66', '#FFAA66'],
- '--color-icon-orange': ['#703500', '#4a1800'],
- '--color-text-orange': ['#703500', '#4a1800'],
-
- '--color-background-teal': ['#A8EED0', '#A8EED0'],
- '--color-border-teal': ['#78E0B0', '#78E0B0'],
- '--color-icon-teal': ['#005530', '#003018'],
- '--color-text-teal': ['#005530', '#003018'],
-
- // Gray (cream neutral H=75 C=8)
- '--color-background-gray': ['#ede0d4', '#ede0d4'],
- '--color-border-gray': ['#dfd2c6', '#dfd2c6'],
- '--color-icon-gray': ['#4f453b', '#2d241b'],
- '--color-text-gray': ['#4f453b', '#2d241b'],
+ // Categorical colors
+ '--color-background-green': [green.light[80], green.dark[80]],
+ '--color-border-green': [green.light[75], green.dark[75]],
+ '--color-icon-green': [green.light[30], green.dark[20]],
+ '--color-text-green': [green.light[30], green.dark[20]],
+
+ '--color-background-red': [red.light[85], red.dark[85]],
+ '--color-border-red': [red.light[75], red.dark[75]],
+ '--color-icon-red': [red.light[30], red.dark[20]],
+ '--color-text-red': [red.light[30], red.dark[20]],
+
+ '--color-background-yellow': [yellow.light[90], yellow.dark[90]],
+ '--color-border-yellow': [yellow.light[85], yellow.dark[85]],
+ '--color-icon-yellow': [yellow.light[30], yellow.dark[20]],
+ '--color-text-yellow': [yellow.light[30], yellow.dark[20]],
+
+ '--color-background-blue': [blue.light[85], blue.dark[85]],
+ '--color-border-blue': [blue.light[75], blue.dark[75]],
+ '--color-icon-blue': [blue.light[20], blue.dark[20]],
+ '--color-text-blue': [blue.light[20], blue.dark[20]],
+
+ '--color-background-pink': [pink.light[85], pink.dark[85]],
+ '--color-border-pink': [pink.light[80], pink.dark[80]],
+ '--color-icon-pink': [pink.light[30], pink.dark[20]],
+ '--color-text-pink': [pink.light[30], pink.dark[20]],
+
+ '--color-background-purple': [purple.light[85], purple.dark[85]],
+ '--color-border-purple': [purple.light[75], purple.dark[75]],
+ '--color-icon-purple': [purple.light[25], purple.dark[15]],
+ '--color-text-purple': [purple.light[25], purple.dark[15]],
+
+ '--color-background-cyan': [cyan.light[90], cyan.dark[90]],
+ '--color-border-cyan': [cyan.light[80], cyan.dark[80]],
+ '--color-icon-cyan': [cyan.light[30], cyan.dark[15]],
+ '--color-text-cyan': [cyan.light[30], cyan.dark[15]],
+
+ '--color-background-orange': [orange.light[85], orange.dark[85]],
+ '--color-border-orange': [orange.light[80], orange.dark[80]],
+ '--color-icon-orange': [orange.light[30], orange.dark[15]],
+ '--color-text-orange': [orange.light[30], orange.dark[15]],
+
+ '--color-background-teal': [teal.light[90], teal.dark[85]],
+ '--color-border-teal': [teal.light[80], teal.dark[80]],
+ '--color-icon-teal': [teal.light[30], teal.dark[15]],
+ '--color-text-teal': [teal.light[30], teal.dark[15]],
+
+ // Gray
+ '--color-background-gray': [neutral.light[90], neutral.dark[90]],
+ '--color-border-gray': [neutral.light[85], neutral.dark[85]],
+ '--color-icon-gray': [neutral.light[30], neutral.dark[10]],
+ '--color-text-gray': [neutral.light[30], neutral.dark[10]],
// =========================================================================
// Radius — sharp / brutalist (multiplier: 0 via radius config + explicit)
@@ -262,14 +291,14 @@ export const y2kTheme = defineTheme({
// =========================================================================
// Shadows — warm cream neutral
// =========================================================================
- '--shadow-low': '0 2px 4px #2d241b0D, 0 4px 8px #2d241b1A',
- '--shadow-med': '0 2px 4px #2d241b0D, 0 4px 12px #2d241b1A',
- '--shadow-high': '0 4px 6px #2d241b1A, 0 12px 24px #2d241b26',
- '--shadow-inset-hover': 'inset 0px 0px 0px 2px #2d241b30',
- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #2d241b50',
- '--shadow-inset-success': 'inset 0px 0px 0px 2px #3a550050',
- '--shadow-inset-warning': 'inset 0px 0px 0px 2px #61440050',
- '--shadow-inset-error': 'inset 0px 0px 0px 2px #8b1d2450',
+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.light[15], '0D')}, 0 4px 8px ${withAlpha(neutral.light[15], '1A')}`,
+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.light[15], '0D')}, 0 4px 12px ${withAlpha(neutral.light[15], '1A')}`,
+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.light[15], '1A')}, 0 12px 24px ${withAlpha(neutral.light[15], '26')}`,
+ '--shadow-inset-hover': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[15], '30')}`,
+ '--shadow-inset-selected': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[15], '50')}`,
+ '--shadow-inset-success': `inset 0px 0px 0px 2px ${withAlpha(green.light[30], '50')}`,
+ '--shadow-inset-warning': `inset 0px 0px 0px 2px ${withAlpha(yellow.light[30], '50')}`,
+ '--shadow-inset-error': `inset 0px 0px 0px 2px ${withAlpha(red.light[30], '50')}`,
},
components: {
@@ -411,259 +440,3 @@ export const y2kTheme = defineTheme({
icons: y2kIconRegistry,
});
-
-/**
- * Raw tonal palettes — every color at every tone step (0-100 in 5s).
- */
-export const y2kPalettes = {
- neutral: {
- hue: 75,
- chroma: 8,
- 0: '#000000',
- 5: '#190f00',
- 10: '#221a10',
- 15: '#2d241b',
- 20: '#382f25',
- 25: '#433a30',
- 30: '#4f453b',
- 35: '#5b5146',
- 40: '#675d52',
- 45: '#73695e',
- 50: '#80756a',
- 55: '#8d8276',
- 60: '#9a8f83',
- 65: '#a79c90',
- 70: '#b5a99d',
- 75: '#c3b7ab',
- 80: '#d1c5b8',
- 85: '#dfd2c6',
- 90: '#ede0d4',
- 95: '#fbefe2',
- 100: '#ffffff',
- },
- green: {
- hue: 120,
- chroma: 60,
- 0: '#000000',
- 5: '#061800',
- 10: '#132200',
- 15: '#152d00',
- 20: '#173900',
- 25: '#1e4500',
- 30: '#285100',
- 35: '#355d00',
- 40: '#426900',
- 45: '#4f7600',
- 50: '#5c830b',
- 55: '#69901d',
- 60: '#779d2c',
- 65: '#84aa39',
- 70: '#92b847',
- 75: '#a0c654',
- 80: '#aed461',
- 85: '#bce26e',
- 90: '#caf07b',
- 95: '#d9fe89',
- 100: '#ffffff',
- },
- red: {
- hue: 25,
- chroma: 55,
- 0: '#000000',
- 5: '#480000',
- 10: '#540000',
- 15: '#620002',
- 20: '#700012',
- 25: '#7f001b',
- 30: '#8e1126',
- 35: '#9c2330',
- 40: '#ab313b',
- 45: '#ba3f47',
- 50: '#c94d52',
- 55: '#d95b5e',
- 60: '#e8686b',
- 65: '#f87677',
- 70: '#ff8787',
- 75: '#ff9d9b',
- 80: '#ffb2af',
- 85: '#ffc6c3',
- 90: '#ffd9d7',
- 95: '#ffeceb',
- 100: '#ffffff',
- },
- yellow: {
- hue: 85,
- chroma: 65,
- 0: '#000000',
- 5: '#270c00',
- 10: '#301800',
- 15: '#3b2200',
- 20: '#472c00',
- 25: '#533700',
- 30: '#604200',
- 35: '#6d4d00',
- 40: '#7b5900',
- 45: '#896500',
- 50: '#977100',
- 55: '#a67e00',
- 60: '#b58b01',
- 65: '#c39819',
- 70: '#d2a52a',
- 75: '#e2b239',
- 80: '#f1c047',
- 85: '#ffcd55',
- 90: '#ffde9b',
- 95: '#ffeecf',
- 100: '#ffffff',
- },
- blue: {
- hue: 250,
- chroma: 40,
- 0: '#000000',
- 5: '#001939',
- 10: '#002244',
- 15: '#002c4d',
- 20: '#003759',
- 25: '#004266',
- 30: '#004e74',
- 35: '#005a83',
- 40: '#006693',
- 45: '#0073a3',
- 50: '#0080b4',
- 55: '#008ec4',
- 60: '#0e9bd2',
- 65: '#2fa8e0',
- 70: '#45b6ef',
- 75: '#57c3fd',
- 80: '#7ed0ff',
- 85: '#a3dbff',
- 90: '#c4e7ff',
- 95: '#e1f3ff',
- 100: '#ffffff',
- },
- pink: {
- hue: 350,
- chroma: 45,
- 0: '#000000',
- 5: '#3d001d',
- 10: '#490027',
- 15: '#560032',
- 20: '#64003d',
- 25: '#711248',
- 30: '#7f2154',
- 35: '#8c2f60',
- 40: '#9a3c6c',
- 45: '#a84979',
- 50: '#b75685',
- 55: '#c56392',
- 60: '#d371a0',
- 65: '#e27ead',
- 70: '#f18bbb',
- 75: '#ff99c8',
- 80: '#ffaed3',
- 85: '#ffc3de',
- 90: '#ffd7e9',
- 95: '#ffebf4',
- 100: '#ffffff',
- },
- purple: {
- hue: 300,
- chroma: 40,
- 0: '#000000',
- 5: '#020840',
- 10: '#11144b',
- 15: '#1f1e57',
- 20: '#2c2864',
- 25: '#393370',
- 30: '#453e7d',
- 35: '#524a8a',
- 40: '#5f5697',
- 45: '#6c62a4',
- 50: '#796eb2',
- 55: '#867bc0',
- 60: '#9387ce',
- 65: '#a194dc',
- 70: '#afa2ea',
- 75: '#bdaff8',
- 80: '#cbbeff',
- 85: '#d9ceff',
- 90: '#e6deff',
- 95: '#f3eeff',
- 100: '#ffffff',
- },
- cyan: {
- hue: 185,
- chroma: 35,
- 0: '#000000',
- 5: '#001e14',
- 10: '#00261f',
- 15: '#003029',
- 20: '#003b34',
- 25: '#00473f',
- 30: '#00534a',
- 35: '#005f56',
- 40: '#006c62',
- 45: '#00796f',
- 50: '#00867b',
- 55: '#0f9488',
- 60: '#29a195',
- 65: '#3bafa2',
- 70: '#4cbcb0',
- 75: '#5bcabd',
- 80: '#6ad8cb',
- 85: '#79e7d9',
- 90: '#87f5e7',
- 95: '#a6fff5',
- 100: '#ffffff',
- },
- orange: {
- hue: 60,
- chroma: 60,
- 0: '#000000',
- 5: '#340000',
- 10: '#420500',
- 15: '#520b00',
- 20: '#601700',
- 25: '#6d2400',
- 30: '#7b3000',
- 35: '#893c00',
- 40: '#984800',
- 45: '#a75409',
- 50: '#b66019',
- 55: '#c56d26',
- 60: '#d47a33',
- 65: '#e48740',
- 70: '#f3944c',
- 75: '#ffa25c',
- 80: '#ffb682',
- 85: '#ffc9a3',
- 90: '#ffdbc3',
- 95: '#ffede1',
- 100: '#ffffff',
- },
- teal: {
- hue: 165,
- chroma: 30,
- 0: '#000000',
- 5: '#001d00',
- 10: '#00240f',
- 15: '#002f1a',
- 20: '#003a24',
- 25: '#00462f',
- 30: '#00513a',
- 35: '#115e45',
- 40: '#226a51',
- 45: '#30775d',
- 50: '#3d8469',
- 55: '#4a9175',
- 60: '#589e82',
- 65: '#65ab8f',
- 70: '#72b99c',
- 75: '#7fc7a9',
- 80: '#8dd5b7',
- 85: '#9be3c5',
- 90: '#a9f2d3',
- 95: '#b6ffe1',
- 100: '#ffffff',
- },
-} as const;
diff --git a/packages/themes/y2k/README.md b/packages/themes/y2k/README.md
index caf4f0a489..2e9183aee1 100644
--- a/packages/themes/y2k/README.md
+++ b/packages/themes/y2k/README.md
@@ -23,11 +23,11 @@ function App() {
### Import paths
-| Path | Use case |
-| -------------------------- | ------------------------------------------------------ |
-| `@astryxdesign/theme-y2k` | Source build (StyleX compilation via `@astryxdesign/build`) |
-| `@astryxdesign/theme-y2k/built` | Pre-built dist (Tailwind, plain CSS, or no build step) |
-| `@astryxdesign/theme-y2k/theme.css` | Pre-built CSS file (import in your stylesheet) |
+| Path | Use case |
+| ----------------------------------- | ----------------------------------------------------------- |
+| `@astryxdesign/theme-y2k` | Source build (StyleX compilation via `@astryxdesign/build`) |
+| `@astryxdesign/theme-y2k/built` | Pre-built dist (Tailwind, plain CSS, or no build step) |
+| `@astryxdesign/theme-y2k/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,41 @@ Add the theme CSS to your stylesheet:
@import '@astryxdesign/theme-y2k/theme.css';
```
+## Colors
+
+Y2K's approved palette is generated from `palette.config.json`. It contains
+complete light and dark ramps for neutral, signature periwinkle, and nine
+categorical families. The light neutral keeps Y2K's warm canvas, while the dark
+neutral follows the navy dark surfaces from `#0E0F1A` toward lavender `#EDEFFC`.
+The periwinkle body `#CCCFFA` and neon green
+`#C5E17A` are exact anchors. Blue uses an anchorless electric ramp while its
+component surface stays close to the original airy blue.
+
+Theme and component roles use semantic tokens backed by the small generated
+`y2kPaletteRefs` selection. Components should consume those semantic tokens,
+not raw palette values. Data-visualization colors remain separate and are not
+overridden by this theme.
+
+The existing `y2kPalettes` export remains unchanged as a compatibility
+snapshot. The complete reviewed mode-aware palette is private to authoring,
+tests, and selected-reference generation, so adopting it does not change the
+public API shape or force the full candidate into theme evaluation.
+
+After changing `palette.config.json`, regenerate the candidate and receipt with:
+
+```bash
+node packages/cli/clients/cli/bin/astryx.mjs theme palette generate \
+ packages/themes/y2k/palette.config.json \
+ --out packages/themes/y2k/src/y2kPalettes.generated.ts \
+ --preview .tmp-y2k-palette-preview.html \
+ --overwrite
+```
+
+Keep the standard copyright header on the committed TypeScript candidate,
+review the preview in both modes, remove `.tmp-y2k-palette-preview.html`, then
+run `pnpm generate:y2k-palette-refs`. Keep the theme package and CLI template
+copies synchronized.
+
## Fonts
This theme uses custom typefaces:
diff --git a/packages/themes/y2k/package.json b/packages/themes/y2k/package.json
index d7bde3ba97..5f82a7acb4 100644
--- a/packages/themes/y2k/package.json
+++ b/packages/themes/y2k/package.json
@@ -50,11 +50,12 @@
"files": [
"dist",
"src",
+ "palette.config.json",
"fonts.css",
"fonts.css.d.ts"
],
"scripts": {
- "build": "node ../../../scripts/clean-dist.mjs && astryx theme build src/y2kTheme.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-y2k-palette-refs.mjs --check && astryx theme build src/y2kTheme.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/y2k/palette.config.json b/packages/themes/y2k/palette.config.json
new file mode 100644
index 0000000000..ca931dbca4
--- /dev/null
+++ b/packages/themes/y2k/palette.config.json
@@ -0,0 +1,166 @@
+{
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 72,
+ "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": "Y2K Neutral",
+ "seed": "#fff6ed",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 15,
+ "color": "#2d241b",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 40,
+ "color": "#675d52",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#d1c5b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 95,
+ "color": "#fff6ed",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 5,
+ "color": "#0e0f1a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#16182b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2238",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 35,
+ "color": "#4a4f6b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a6acd6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#edeffc",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "accent",
+ "name": "Periwinkle",
+ "seed": "#cccffa",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Red",
+ "seed": "#ff6f7a",
+ "anchors": []
+ },
+ {
+ "id": "orange",
+ "name": "Orange",
+ "seed": "#ff9f4a",
+ "anchors": []
+ },
+ {
+ "id": "yellow",
+ "name": "Yellow",
+ "seed": "#ffd34f",
+ "anchors": []
+ },
+ {
+ "id": "green",
+ "name": "Green",
+ "seed": "#c5e17a",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Teal",
+ "seed": "#48c99a",
+ "anchors": []
+ },
+ {
+ "id": "cyan",
+ "name": "Cyan",
+ "seed": "#42d4d0",
+ "anchors": []
+ },
+ {
+ "id": "blue",
+ "name": "Blue",
+ "seed": "#00a8ff",
+ "anchors": []
+ },
+ {
+ "id": "purple",
+ "name": "Purple",
+ "seed": "#a589ff",
+ "anchors": []
+ },
+ {
+ "id": "pink",
+ "name": "Pink",
+ "seed": "#ff72b6",
+ "anchors": []
+ }
+ ]
+}
diff --git a/packages/themes/y2k/src/__snapshots__/y2kPalettes.test.ts.snap b/packages/themes/y2k/src/__snapshots__/y2kPalettes.test.ts.snap
new file mode 100644
index 0000000000..66b2a4c551
--- /dev/null
+++ b/packages/themes/y2k/src/__snapshots__/y2kPalettes.test.ts.snap
@@ -0,0 +1,256 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`Y2K palette artifact > matches the complete released legacy object 1`] = `
+{
+ "blue": {
+ "0": "#000000",
+ "10": "#002244",
+ "100": "#ffffff",
+ "15": "#002c4d",
+ "20": "#003759",
+ "25": "#004266",
+ "30": "#004e74",
+ "35": "#005a83",
+ "40": "#006693",
+ "45": "#0073a3",
+ "5": "#001939",
+ "50": "#0080b4",
+ "55": "#008ec4",
+ "60": "#0e9bd2",
+ "65": "#2fa8e0",
+ "70": "#45b6ef",
+ "75": "#57c3fd",
+ "80": "#7ed0ff",
+ "85": "#a3dbff",
+ "90": "#c4e7ff",
+ "95": "#e1f3ff",
+ "chroma": 40,
+ "hue": 250,
+ },
+ "cyan": {
+ "0": "#000000",
+ "10": "#00261f",
+ "100": "#ffffff",
+ "15": "#003029",
+ "20": "#003b34",
+ "25": "#00473f",
+ "30": "#00534a",
+ "35": "#005f56",
+ "40": "#006c62",
+ "45": "#00796f",
+ "5": "#001e14",
+ "50": "#00867b",
+ "55": "#0f9488",
+ "60": "#29a195",
+ "65": "#3bafa2",
+ "70": "#4cbcb0",
+ "75": "#5bcabd",
+ "80": "#6ad8cb",
+ "85": "#79e7d9",
+ "90": "#87f5e7",
+ "95": "#a6fff5",
+ "chroma": 35,
+ "hue": 185,
+ },
+ "green": {
+ "0": "#000000",
+ "10": "#132200",
+ "100": "#ffffff",
+ "15": "#152d00",
+ "20": "#173900",
+ "25": "#1e4500",
+ "30": "#285100",
+ "35": "#355d00",
+ "40": "#426900",
+ "45": "#4f7600",
+ "5": "#061800",
+ "50": "#5c830b",
+ "55": "#69901d",
+ "60": "#779d2c",
+ "65": "#84aa39",
+ "70": "#92b847",
+ "75": "#a0c654",
+ "80": "#aed461",
+ "85": "#bce26e",
+ "90": "#caf07b",
+ "95": "#d9fe89",
+ "chroma": 60,
+ "hue": 120,
+ },
+ "neutral": {
+ "0": "#000000",
+ "10": "#221a10",
+ "100": "#ffffff",
+ "15": "#2d241b",
+ "20": "#382f25",
+ "25": "#433a30",
+ "30": "#4f453b",
+ "35": "#5b5146",
+ "40": "#675d52",
+ "45": "#73695e",
+ "5": "#190f00",
+ "50": "#80756a",
+ "55": "#8d8276",
+ "60": "#9a8f83",
+ "65": "#a79c90",
+ "70": "#b5a99d",
+ "75": "#c3b7ab",
+ "80": "#d1c5b8",
+ "85": "#dfd2c6",
+ "90": "#ede0d4",
+ "95": "#fbefe2",
+ "chroma": 8,
+ "hue": 75,
+ },
+ "orange": {
+ "0": "#000000",
+ "10": "#420500",
+ "100": "#ffffff",
+ "15": "#520b00",
+ "20": "#601700",
+ "25": "#6d2400",
+ "30": "#7b3000",
+ "35": "#893c00",
+ "40": "#984800",
+ "45": "#a75409",
+ "5": "#340000",
+ "50": "#b66019",
+ "55": "#c56d26",
+ "60": "#d47a33",
+ "65": "#e48740",
+ "70": "#f3944c",
+ "75": "#ffa25c",
+ "80": "#ffb682",
+ "85": "#ffc9a3",
+ "90": "#ffdbc3",
+ "95": "#ffede1",
+ "chroma": 60,
+ "hue": 60,
+ },
+ "pink": {
+ "0": "#000000",
+ "10": "#490027",
+ "100": "#ffffff",
+ "15": "#560032",
+ "20": "#64003d",
+ "25": "#711248",
+ "30": "#7f2154",
+ "35": "#8c2f60",
+ "40": "#9a3c6c",
+ "45": "#a84979",
+ "5": "#3d001d",
+ "50": "#b75685",
+ "55": "#c56392",
+ "60": "#d371a0",
+ "65": "#e27ead",
+ "70": "#f18bbb",
+ "75": "#ff99c8",
+ "80": "#ffaed3",
+ "85": "#ffc3de",
+ "90": "#ffd7e9",
+ "95": "#ffebf4",
+ "chroma": 45,
+ "hue": 350,
+ },
+ "purple": {
+ "0": "#000000",
+ "10": "#11144b",
+ "100": "#ffffff",
+ "15": "#1f1e57",
+ "20": "#2c2864",
+ "25": "#393370",
+ "30": "#453e7d",
+ "35": "#524a8a",
+ "40": "#5f5697",
+ "45": "#6c62a4",
+ "5": "#020840",
+ "50": "#796eb2",
+ "55": "#867bc0",
+ "60": "#9387ce",
+ "65": "#a194dc",
+ "70": "#afa2ea",
+ "75": "#bdaff8",
+ "80": "#cbbeff",
+ "85": "#d9ceff",
+ "90": "#e6deff",
+ "95": "#f3eeff",
+ "chroma": 40,
+ "hue": 300,
+ },
+ "red": {
+ "0": "#000000",
+ "10": "#540000",
+ "100": "#ffffff",
+ "15": "#620002",
+ "20": "#700012",
+ "25": "#7f001b",
+ "30": "#8e1126",
+ "35": "#9c2330",
+ "40": "#ab313b",
+ "45": "#ba3f47",
+ "5": "#480000",
+ "50": "#c94d52",
+ "55": "#d95b5e",
+ "60": "#e8686b",
+ "65": "#f87677",
+ "70": "#ff8787",
+ "75": "#ff9d9b",
+ "80": "#ffb2af",
+ "85": "#ffc6c3",
+ "90": "#ffd9d7",
+ "95": "#ffeceb",
+ "chroma": 55,
+ "hue": 25,
+ },
+ "teal": {
+ "0": "#000000",
+ "10": "#00240f",
+ "100": "#ffffff",
+ "15": "#002f1a",
+ "20": "#003a24",
+ "25": "#00462f",
+ "30": "#00513a",
+ "35": "#115e45",
+ "40": "#226a51",
+ "45": "#30775d",
+ "5": "#001d00",
+ "50": "#3d8469",
+ "55": "#4a9175",
+ "60": "#589e82",
+ "65": "#65ab8f",
+ "70": "#72b99c",
+ "75": "#7fc7a9",
+ "80": "#8dd5b7",
+ "85": "#9be3c5",
+ "90": "#a9f2d3",
+ "95": "#b6ffe1",
+ "chroma": 30,
+ "hue": 165,
+ },
+ "yellow": {
+ "0": "#000000",
+ "10": "#301800",
+ "100": "#ffffff",
+ "15": "#3b2200",
+ "20": "#472c00",
+ "25": "#533700",
+ "30": "#604200",
+ "35": "#6d4d00",
+ "40": "#7b5900",
+ "45": "#896500",
+ "5": "#270c00",
+ "50": "#977100",
+ "55": "#a67e00",
+ "60": "#b58b01",
+ "65": "#c39819",
+ "70": "#d2a52a",
+ "75": "#e2b239",
+ "80": "#f1c047",
+ "85": "#ffcd55",
+ "90": "#ffde9b",
+ "95": "#ffeecf",
+ "chroma": 65,
+ "hue": 85,
+ },
+}
+`;
diff --git a/packages/themes/y2k/src/source.ts b/packages/themes/y2k/src/source.ts
index ccc9225e9b..8573cd203b 100644
--- a/packages/themes/y2k/src/source.ts
+++ b/packages/themes/y2k/src/source.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-export {y2kTheme, y2kPalettes} from './y2kTheme';
+export {y2kTheme} from './y2kTheme';
+export {y2kPalettes} from './y2kPalettes';
export {y2kIconRegistry} from './icons';
diff --git a/packages/themes/y2k/src/y2kColorMapping.test.ts b/packages/themes/y2k/src/y2kColorMapping.test.ts
new file mode 100644
index 0000000000..42cc0bb8be
--- /dev/null
+++ b/packages/themes/y2k/src/y2kColorMapping.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 {palette as y2kModePalettes} from './y2kPalettes.generated';
+import {y2kTheme} from './y2kTheme';
+
+const categoricalFamilies = [
+ 'cyan',
+ 'green',
+ 'orange',
+ 'pink',
+ 'purple',
+ 'red',
+ 'teal',
+ 'yellow',
+] as const;
+
+describe('Y2K palette mapping', () => {
+ it('preserves the periwinkle body and uses reviewed neutral surfaces', () => {
+ const light = resolveThemeTokens(y2kTheme, {mode: 'light'});
+ const dark = resolveThemeTokens(y2kTheme, {mode: 'dark'});
+ expect(light['--color-background-body']).toBe(
+ y2kModePalettes.accent.light[80],
+ );
+ expect(dark['--color-background-body']).toBe(
+ y2kModePalettes.neutral.dark[5],
+ );
+ expect(light['--color-text-primary']).toBe(
+ y2kModePalettes.neutral.light[15],
+ );
+ expect(dark['--color-text-primary']).toBe(y2kModePalettes.neutral.dark[95]);
+ });
+
+ it('maps neon Green and success to the shared Green family', () => {
+ const light = resolveThemeTokens(y2kTheme, {mode: 'light'});
+ const dark = resolveThemeTokens(y2kTheme, {mode: 'dark'});
+ expect(light['--color-success']).toBe(y2kModePalettes.green.light[80]);
+ expect(dark['--color-success']).toBe(y2kModePalettes.green.dark[80]);
+ expect(light['--color-background-green']).toBe(
+ y2kModePalettes.green.light[80],
+ );
+ expect(dark['--color-background-green']).toBe(
+ y2kModePalettes.green.dark[80],
+ );
+ });
+
+ it('keeps Blue airy while increasing its electric saturation', () => {
+ const light = resolveThemeTokens(y2kTheme, {mode: 'light'});
+ const dark = resolveThemeTokens(y2kTheme, {mode: 'dark'});
+ expect(light['--color-background-blue']).toBe(
+ y2kModePalettes.blue.light[85],
+ );
+ expect(dark['--color-background-blue']).toBe(y2kModePalettes.blue.dark[85]);
+ expect(light['--color-border-blue']).toBe(y2kModePalettes.blue.light[75]);
+ expect(dark['--color-text-blue']).toBe(y2kModePalettes.blue.dark[20]);
+ });
+
+ it.each(['light', 'dark'] as const)(
+ 'maps the remaining categorical roles to reviewed %s stops',
+ mode => {
+ const tokens = resolveThemeTokens(y2kTheme, {mode});
+ for (const family of categoricalFamilies) {
+ const ramp = y2kModePalettes[family][mode];
+ expect(tokens[`--color-background-${family}`]).toMatch(
+ /^#[0-9a-f]{6}$/i,
+ );
+ expect(tokens[`--color-border-${family}`]).toMatch(/^#[0-9a-f]{6}$/i);
+ expect(tokens[`--color-icon-${family}`]).toMatch(/^#[0-9a-f]{6}$/i);
+ expect(Object.values(ramp)).toContain(
+ tokens[`--color-background-${family}`],
+ );
+ expect(Object.values(ramp)).toContain(tokens[`--color-text-${family}`]);
+ }
+ },
+ );
+});
diff --git a/packages/themes/y2k/src/y2kPaletteRefs.generated.ts b/packages/themes/y2k/src/y2kPaletteRefs.generated.ts
new file mode 100644
index 0000000000..6def40684a
--- /dev/null
+++ b/packages/themes/y2k/src/y2kPaletteRefs.generated.ts
@@ -0,0 +1,54 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+// Generated from the committed full palette for the stops used by Y2K's
+// theme source. Regenerate with `pnpm generate:y2k-palette-refs`.
+// Keep the complete palette available for authoring and audits without
+// making consumers pay for unused palette stops.
+// prettier-ignore
+export const y2kPaletteRefs = {
+ purple: {
+ light: {25: '#431a88', 40: '#663ebd', 75: '#bbaaff', 85: '#d5cdff'},
+ dark: {15: '#2a1159', 75: '#bbaaff', 85: '#d5cdff'},
+ },
+ green: {
+ light: {30: '#3f4e00', 40: '#546800', 75: '#b5d360', 80: '#c5e17a'},
+ dark: {20: '#2a3600', 65: '#95b041', 75: '#b5d263', 80: '#c5e17a'},
+ },
+ neutral: {
+ light: {15: '#2d241b', 20: '#382e24', 30: '#4f453b', 40: '#675d52', 80: '#d1c5b8', 85: '#dfd5c9', 90: '#f1e6db', 95: '#fff6ed', 100: '#ffffff'},
+ dark: {0: '#000000', 5: '#0e0f1a', 10: '#16182b', 20: '#1f2238', 25: '#2c3048', 35: '#4a4f6b', 45: '#636889', 70: '#a6acd6', 85: '#d0d4eb', 90: '#dfe2f3', 95: '#edeffc'},
+ },
+ orange: {
+ light: {30: '#703400', 40: '#904800', 80: '#ffb477', 85: '#ffc89d'},
+ dark: {15: '#411800', 80: '#ffb477', 85: '#ffc89d'},
+ },
+ blue: {
+ light: {20: '#003454', 40: '#00649b', 75: '#70c1ff', 85: '#addbff'},
+ dark: {20: '#003454', 75: '#70c1ff', 85: '#addbff'},
+ },
+ red: {
+ light: {30: '#880023', 35: '#9d002a', 75: '#ff969a', 85: '#ffc3c3'},
+ dark: {20: '#610016', 75: '#ff969a', 85: '#ffc3c3'},
+ },
+ yellow: {
+ light: {30: '#584400', 40: '#745b00', 85: '#f9d059', 90: '#ffe08a'},
+ dark: {20: '#3d2e00', 70: '#d0a601', 85: '#f3d172', 90: '#fde08f'},
+ },
+ teal: {
+ light: {30: '#00553b', 40: '#007050', 80: '#81dcb6', 90: '#b6f2d7'},
+ dark: {15: '#002f1e', 70: '#5bc29a', 80: '#8ed9b9', 85: '#a6e5c9'},
+ },
+ accent: {
+ light: {80: '#cccffa'},
+ },
+ pink: {
+ light: {30: '#82004f', 80: '#ffa8cd', 85: '#ffbfd9'},
+ dark: {20: '#5d0037', 80: '#ffa8cd', 85: '#ffbfd9'},
+ },
+ cyan: {
+ light: {30: '#005250', 80: '#73dbd7', 90: '#b2f0ed'},
+ dark: {15: '#002d2c', 80: '#84d8d4', 90: '#baeeec'},
+ },
+} as const;
+
+export default y2kPaletteRefs;
diff --git a/packages/themes/y2k/src/y2kPalettes.generated.receipt.json b/packages/themes/y2k/src/y2kPalettes.generated.receipt.json
new file mode 100644
index 0000000000..7cc2506251
--- /dev/null
+++ b/packages/themes/y2k/src/y2kPalettes.generated.receipt.json
@@ -0,0 +1,872 @@
+{
+ "schemaVersion": 1,
+ "recipe": "astryx-oklch-v1",
+ "generatorVersion": "palette-generator-v1",
+ "candidateFormatVersion": "palette-typescript-v1",
+ "candidateSha256": "c2c92ea97651d25b119f2f92f26d6e59b3d26bce68e93a00dedf9001e2ccc68f",
+ "preview": {
+ "version": "palette-preview-v1",
+ "sha256": "0d8677af0609f0b32afa97d3e5e9d263d1e1050afc5fb2e6a4e48c56527166c1"
+ },
+ "request": {
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 72,
+ "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": "Y2K Neutral",
+ "seed": "#fff6ed",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 15,
+ "color": "#2d241b",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 40,
+ "color": "#675d52",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#d1c5b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "light",
+ "stop": 95,
+ "color": "#fff6ed",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 5,
+ "color": "#0e0f1a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#16182b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2238",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 35,
+ "color": "#4a4f6b",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a6acd6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#edeffc",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "accent",
+ "name": "Periwinkle",
+ "seed": "#cccffa",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Red",
+ "seed": "#ff6f7a",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "orange",
+ "name": "Orange",
+ "seed": "#ff9f4a",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "yellow",
+ "name": "Yellow",
+ "seed": "#ffd34f",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "green",
+ "name": "Green",
+ "seed": "#c5e17a",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Teal",
+ "seed": "#48c99a",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "cyan",
+ "name": "Cyan",
+ "seed": "#42d4d0",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "blue",
+ "name": "Blue",
+ "seed": "#00a8ff",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "purple",
+ "name": "Purple",
+ "seed": "#a589ff",
+ "kind": "chromatic",
+ "anchors": []
+ },
+ {
+ "id": "pink",
+ "name": "Pink",
+ "seed": "#ff72b6",
+ "kind": "chromatic",
+ "anchors": []
+ }
+ ]
+ },
+ "diagnostics": {
+ "families": {
+ "neutral": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.7094097662383887,
+ "maximumAdjacentDeltaE": 17.80240344462996,
+ "maximumHueDrift": 10.715070091410723,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 15,
+ "color": "#2d241b",
+ "policy": "exact",
+ "generatedColor": "#2d241b",
+ "deltaE": 0
+ },
+ {
+ "mode": "light",
+ "stop": 40,
+ "color": "#675d52",
+ "policy": "exact",
+ "generatedColor": "#675d52",
+ "deltaE": 0
+ },
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#d1c5b8",
+ "policy": "exact",
+ "generatedColor": "#d1c5b8",
+ "deltaE": 0
+ },
+ {
+ "mode": "light",
+ "stop": 95,
+ "color": "#fff6ed",
+ "policy": "exact",
+ "generatedColor": "#fff6ed",
+ "deltaE": 0
+ }
+ ]
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.097456744882365,
+ "maximumAdjacentDeltaE": 17.473009311118187,
+ "maximumHueDrift": 154.37573698243727,
+ "hueIdentityRisk": "yellow-to-brown",
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 5,
+ "color": "#0e0f1a",
+ "policy": "exact",
+ "generatedColor": "#0e0f1a",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#16182b",
+ "policy": "exact",
+ "generatedColor": "#16182b",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2238",
+ "policy": "exact",
+ "generatedColor": "#1f2238",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 35,
+ "color": "#4a4f6b",
+ "policy": "exact",
+ "generatedColor": "#4a4f6b",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a6acd6",
+ "policy": "exact",
+ "generatedColor": "#a6acd6",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#edeffc",
+ "policy": "exact",
+ "generatedColor": "#edeffc",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "accent": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.0670015525719916,
+ "maximumAdjacentDeltaE": 19.608202933100333,
+ "maximumHueDrift": 3.944707439084482,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact",
+ "generatedColor": "#cccffa",
+ "deltaE": 0
+ }
+ ]
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.0670015525719916,
+ "maximumAdjacentDeltaE": 19.138331195398898,
+ "maximumHueDrift": 4.221445644033679,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#cccffa",
+ "policy": "exact",
+ "generatedColor": "#cccffa",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "red": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.22930681993813,
+ "maximumAdjacentDeltaE": 19.694235227613888,
+ "maximumHueDrift": 3.098232729028041,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.143184771350663,
+ "maximumAdjacentDeltaE": 19.694235227613888,
+ "maximumHueDrift": 3.038241972299886,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "orange": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.2746171124590715,
+ "maximumAdjacentDeltaE": 18.59918172833274,
+ "maximumHueDrift": 18.262856662538297,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.200841331349473,
+ "maximumAdjacentDeltaE": 18.59918172833274,
+ "maximumHueDrift": 18.262856662538297,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "yellow": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.21766838334021,
+ "maximumAdjacentDeltaE": 18.108804228656158,
+ "maximumHueDrift": 8.277463562561138,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.21766838334021,
+ "maximumAdjacentDeltaE": 18.108804228656158,
+ "maximumHueDrift": 8.277463562561138,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "green": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.813896899932746,
+ "maximumAdjacentDeltaE": 18.285555847029293,
+ "maximumHueDrift": 2.0212572628068415,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "light",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact",
+ "generatedColor": "#c5e17a",
+ "deltaE": 0
+ }
+ ]
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.074317635406035,
+ "maximumAdjacentDeltaE": 18.285555847029293,
+ "maximumHueDrift": 2.47101617952535,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c5e17a",
+ "policy": "exact",
+ "generatedColor": "#c5e17a",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "teal": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.073753220031362,
+ "maximumAdjacentDeltaE": 18.51406506466185,
+ "maximumHueDrift": 3.2006309423411494,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.129308135657254,
+ "maximumAdjacentDeltaE": 18.51406506466185,
+ "maximumHueDrift": 3.2006309423411494,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "cyan": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.153111085482815,
+ "maximumAdjacentDeltaE": 18.342189976833094,
+ "maximumHueDrift": 1.0719487972921797,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.153111085482815,
+ "maximumAdjacentDeltaE": 18.342189976833094,
+ "maximumHueDrift": 1.279065119751749,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "blue": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.145720742183582,
+ "maximumAdjacentDeltaE": 18.56573438476547,
+ "maximumHueDrift": 6.358281000663965,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.145720742183582,
+ "maximumAdjacentDeltaE": 18.56573438476547,
+ "maximumHueDrift": 6.358281000663965,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "purple": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.210187504380509,
+ "maximumAdjacentDeltaE": 20.153582458277334,
+ "maximumHueDrift": 1.6035632553639516,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.149104038826761,
+ "maximumAdjacentDeltaE": 19.60669329036918,
+ "maximumHueDrift": 1.4953032794496721,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ },
+ "pink": {
+ "light": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.216332639517304,
+ "maximumAdjacentDeltaE": 19.83461373324314,
+ "maximumHueDrift": 2.414658212370682,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ },
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 4.231584312472901,
+ "maximumAdjacentDeltaE": 19.83461373324314,
+ "maximumHueDrift": 2.723229784222667,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": []
+ }
+ }
+ },
+ "coordination": [
+ {
+ "mode": "light",
+ "stop": 50,
+ "closestFamilies": [
+ "Periwinkle",
+ "Purple"
+ ],
+ "minimumFamilyDeltaE": 4.131386051087785,
+ "strongestFamily": "Pink",
+ "weakestFamily": "Cyan",
+ "chromaRatio": 2.248680832740881
+ },
+ {
+ "mode": "dark",
+ "stop": 50,
+ "closestFamilies": [
+ "Periwinkle",
+ "Purple"
+ ],
+ "minimumFamilyDeltaE": 3.582346320738832,
+ "strongestFamily": "Pink",
+ "weakestFamily": "Cyan",
+ "chromaRatio": 1.9088960897373277
+ }
+ ]
+ }
+}
diff --git a/packages/themes/y2k/src/y2kPalettes.generated.ts b/packages/themes/y2k/src/y2kPalettes.generated.ts
new file mode 100644
index 0000000000..2b202e0226
--- /dev/null
+++ b/packages/themes/y2k/src/y2kPalettes.generated.ts
@@ -0,0 +1,550 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+// Generated by astryx-oklch-v1. Review before committing.
+export const black = '#000000' as const;
+export const white = '#ffffff' as const;
+
+// prettier-ignore
+export const palette = {
+ "neutral": {
+ "name": "Y2K Neutral",
+ "light": {
+ "0": "#000000",
+ "5": "#15100b",
+ "10": "#211a13",
+ "15": "#2d241b",
+ "20": "#382e24",
+ "25": "#433930",
+ "30": "#4f453b",
+ "35": "#5a5146",
+ "40": "#675d52",
+ "45": "#73695e",
+ "50": "#7f766a",
+ "55": "#8d8275",
+ "60": "#9a8f82",
+ "65": "#a99c8e",
+ "70": "#b6aa9c",
+ "75": "#c4b8a9",
+ "80": "#d1c5b8",
+ "85": "#dfd5c9",
+ "90": "#f1e6db",
+ "95": "#fff6ed",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#0e0f1a",
+ "10": "#16182b",
+ "15": "#1a1d31",
+ "20": "#1f2238",
+ "25": "#2c3048",
+ "30": "#3d415b",
+ "35": "#4a4f6b",
+ "40": "#565b79",
+ "45": "#636889",
+ "50": "#6f7599",
+ "55": "#7c83a9",
+ "60": "#8a91b8",
+ "65": "#989fc8",
+ "70": "#a6acd6",
+ "75": "#b5badd",
+ "80": "#c2c7e4",
+ "85": "#d0d4eb",
+ "90": "#dfe2f3",
+ "95": "#edeffc",
+ "100": "#ffffff"
+ }
+ },
+ "accent": {
+ "name": "Periwinkle",
+ "light": {
+ "0": "#000000",
+ "5": "#0e0634",
+ "10": "#180d4a",
+ "15": "#21155e",
+ "20": "#2a1e71",
+ "25": "#342883",
+ "30": "#3e3395",
+ "35": "#493fa6",
+ "40": "#544bb6",
+ "45": "#5f58c6",
+ "50": "#6b65d5",
+ "55": "#7772e3",
+ "60": "#8482f1",
+ "65": "#9595fc",
+ "70": "#a7a9fd",
+ "75": "#babefb",
+ "80": "#cccffa",
+ "85": "#daddfa",
+ "90": "#e5e7fc",
+ "95": "#f1f1fe",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#0e092f",
+ "10": "#171143",
+ "15": "#211a56",
+ "20": "#2a2367",
+ "25": "#342e79",
+ "30": "#3e3989",
+ "35": "#49449a",
+ "40": "#5450a9",
+ "45": "#605db9",
+ "50": "#6b69c7",
+ "55": "#7877d5",
+ "60": "#8586e3",
+ "65": "#9698ee",
+ "70": "#a7aaf9",
+ "75": "#babefb",
+ "80": "#cccffa",
+ "85": "#daddfa",
+ "90": "#e5e7fc",
+ "95": "#f1f1fe",
+ "100": "#ffffff"
+ }
+ },
+ "red": {
+ "name": "Red",
+ "light": {
+ "0": "#000000",
+ "5": "#2b0004",
+ "10": "#3d0009",
+ "15": "#4f000f",
+ "20": "#610016",
+ "25": "#75001c",
+ "30": "#880023",
+ "35": "#9d002a",
+ "40": "#b20031",
+ "45": "#c70039",
+ "50": "#d91b44",
+ "55": "#e83250",
+ "60": "#f7465e",
+ "65": "#ff5f6f",
+ "70": "#ff7d85",
+ "75": "#ff969a",
+ "80": "#ffadaf",
+ "85": "#ffc3c3",
+ "90": "#ffd7d7",
+ "95": "#ffebeb",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#2b0004",
+ "10": "#3d0009",
+ "15": "#4f000f",
+ "20": "#610016",
+ "25": "#75001c",
+ "30": "#880023",
+ "35": "#9c022b",
+ "40": "#ad1835",
+ "45": "#bd2940",
+ "50": "#cc384c",
+ "55": "#db4859",
+ "60": "#ea5866",
+ "65": "#f76874",
+ "70": "#ff7d85",
+ "75": "#ff969a",
+ "80": "#ffadaf",
+ "85": "#ffc3c3",
+ "90": "#ffd7d7",
+ "95": "#ffebeb",
+ "100": "#ffffff"
+ }
+ },
+ "orange": {
+ "name": "Orange",
+ "light": {
+ "0": "#000000",
+ "5": "#240600",
+ "10": "#320f00",
+ "15": "#411800",
+ "20": "#502100",
+ "25": "#5f2a00",
+ "30": "#703400",
+ "35": "#803e00",
+ "40": "#904800",
+ "45": "#a15300",
+ "50": "#b05f00",
+ "55": "#c26a00",
+ "60": "#d47500",
+ "65": "#e77f00",
+ "70": "#fa8b00",
+ "75": "#ff9e48",
+ "80": "#ffb477",
+ "85": "#ffc89d",
+ "90": "#ffdbbf",
+ "95": "#ffede0",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#240600",
+ "10": "#320f00",
+ "15": "#411800",
+ "20": "#502100",
+ "25": "#5f2a00",
+ "30": "#703400",
+ "35": "#803e00",
+ "40": "#904800",
+ "45": "#a15300",
+ "50": "#b05f00",
+ "55": "#c26a00",
+ "60": "#d47500",
+ "65": "#e77f00",
+ "70": "#f48f2c",
+ "75": "#ff9e48",
+ "80": "#ffb477",
+ "85": "#ffc89d",
+ "90": "#ffdbbf",
+ "95": "#ffede0",
+ "100": "#ffffff"
+ }
+ },
+ "yellow": {
+ "name": "Yellow",
+ "light": {
+ "0": "#000000",
+ "5": "#190f00",
+ "10": "#251a00",
+ "15": "#312400",
+ "20": "#3d2e00",
+ "25": "#4a3900",
+ "30": "#584400",
+ "35": "#664f00",
+ "40": "#745b00",
+ "45": "#836700",
+ "50": "#927300",
+ "55": "#a17f00",
+ "60": "#b08c00",
+ "65": "#c09900",
+ "70": "#d0a600",
+ "75": "#e0b300",
+ "80": "#eec130",
+ "85": "#f9d059",
+ "90": "#ffe08a",
+ "95": "#fff0c7",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#190f00",
+ "10": "#251a00",
+ "15": "#312400",
+ "20": "#3d2e00",
+ "25": "#4a3900",
+ "30": "#584400",
+ "35": "#664f00",
+ "40": "#745b00",
+ "45": "#836700",
+ "50": "#927300",
+ "55": "#a17f00",
+ "60": "#b08c00",
+ "65": "#c09900",
+ "70": "#d0a601",
+ "75": "#dcb436",
+ "80": "#e8c255",
+ "85": "#f3d172",
+ "90": "#fde08f",
+ "95": "#fff0c7",
+ "100": "#ffffff"
+ }
+ },
+ "green": {
+ "name": "Green",
+ "light": {
+ "0": "#000000",
+ "5": "#0d1400",
+ "10": "#171f00",
+ "15": "#212a00",
+ "20": "#2a3600",
+ "25": "#344200",
+ "30": "#3f4e00",
+ "35": "#495b00",
+ "40": "#546800",
+ "45": "#5f7500",
+ "50": "#6a8300",
+ "55": "#769100",
+ "60": "#83a013",
+ "65": "#93b02e",
+ "70": "#a4c246",
+ "75": "#b5d360",
+ "80": "#c5e17a",
+ "85": "#d4ec96",
+ "90": "#dff3b2",
+ "95": "#ecfacd",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#0d1400",
+ "10": "#171f00",
+ "15": "#212a00",
+ "20": "#2a3600",
+ "25": "#344200",
+ "30": "#3f4e00",
+ "35": "#495b00",
+ "40": "#546800",
+ "45": "#5f7500",
+ "50": "#6b8212",
+ "55": "#778f27",
+ "60": "#859f35",
+ "65": "#95b041",
+ "70": "#a5c251",
+ "75": "#b5d263",
+ "80": "#c5e17a",
+ "85": "#d3ec96",
+ "90": "#e0f3b4",
+ "95": "#ecf9d1",
+ "100": "#ffffff"
+ }
+ },
+ "teal": {
+ "name": "Teal",
+ "light": {
+ "0": "#000000",
+ "5": "#00170c",
+ "10": "#002315",
+ "15": "#002f1e",
+ "20": "#003b28",
+ "25": "#004731",
+ "30": "#00553b",
+ "35": "#006246",
+ "40": "#007050",
+ "45": "#007e5b",
+ "50": "#008d65",
+ "55": "#009b70",
+ "60": "#00ab7c",
+ "65": "#0ab987",
+ "70": "#42c696",
+ "75": "#64d1a6",
+ "80": "#81dcb6",
+ "85": "#9ce7c6",
+ "90": "#b6f2d7",
+ "95": "#cffde8",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#00170c",
+ "10": "#002315",
+ "15": "#002f1e",
+ "20": "#003b28",
+ "25": "#004731",
+ "30": "#00553b",
+ "35": "#006246",
+ "40": "#007050",
+ "45": "#007e5b",
+ "50": "#008d65",
+ "55": "#009b70",
+ "60": "#23a97d",
+ "65": "#40b68b",
+ "70": "#5bc29a",
+ "75": "#75cea9",
+ "80": "#8ed9b9",
+ "85": "#a6e5c9",
+ "90": "#bdf0d9",
+ "95": "#d4fce9",
+ "100": "#ffffff"
+ }
+ },
+ "cyan": {
+ "name": "Cyan",
+ "light": {
+ "0": "#000000",
+ "5": "#001615",
+ "10": "#002221",
+ "15": "#002d2c",
+ "20": "#003938",
+ "25": "#004544",
+ "30": "#005250",
+ "35": "#005f5d",
+ "40": "#006d6b",
+ "45": "#007b78",
+ "50": "#008986",
+ "55": "#009794",
+ "60": "#00a6a3",
+ "65": "#00b5b1",
+ "70": "#00c4c0",
+ "75": "#47d0cc",
+ "80": "#73dbd7",
+ "85": "#95e5e2",
+ "90": "#b2f0ed",
+ "95": "#cdfcf9",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#001615",
+ "10": "#002221",
+ "15": "#002d2c",
+ "20": "#003938",
+ "25": "#004544",
+ "30": "#005250",
+ "35": "#005f5d",
+ "40": "#006d6b",
+ "45": "#007b78",
+ "50": "#008986",
+ "55": "#009794",
+ "60": "#00a6a3",
+ "65": "#00b5b1",
+ "70": "#39c2be",
+ "75": "#63cdc9",
+ "80": "#84d8d4",
+ "85": "#a1e3e0",
+ "90": "#baeeec",
+ "95": "#d3faf8",
+ "100": "#ffffff"
+ }
+ },
+ "blue": {
+ "name": "Blue",
+ "light": {
+ "0": "#000000",
+ "5": "#001226",
+ "10": "#001e35",
+ "15": "#002844",
+ "20": "#003454",
+ "25": "#003f65",
+ "30": "#004b76",
+ "35": "#005788",
+ "40": "#00649b",
+ "45": "#0071ae",
+ "50": "#007ec1",
+ "55": "#008bd5",
+ "60": "#0099e9",
+ "65": "#00a7fd",
+ "70": "#49b4ff",
+ "75": "#70c1ff",
+ "80": "#90ceff",
+ "85": "#addbff",
+ "90": "#c9e7ff",
+ "95": "#e4f3ff",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#001226",
+ "10": "#001e35",
+ "15": "#002844",
+ "20": "#003454",
+ "25": "#003f65",
+ "30": "#004b76",
+ "35": "#005788",
+ "40": "#00649b",
+ "45": "#0071ae",
+ "50": "#007ec1",
+ "55": "#008bd5",
+ "60": "#0099e9",
+ "65": "#00a7fd",
+ "70": "#49b4ff",
+ "75": "#70c1ff",
+ "80": "#90ceff",
+ "85": "#addbff",
+ "90": "#c9e7ff",
+ "95": "#e4f3ff",
+ "100": "#ffffff"
+ }
+ },
+ "purple": {
+ "name": "Purple",
+ "light": {
+ "0": "#000000",
+ "5": "#150136",
+ "10": "#21014e",
+ "15": "#2c0662",
+ "20": "#370f75",
+ "25": "#431a88",
+ "30": "#4e259a",
+ "35": "#5a31ac",
+ "40": "#663ebd",
+ "45": "#724bcd",
+ "50": "#7e58dc",
+ "55": "#8a66ea",
+ "60": "#9775f7",
+ "65": "#a385ff",
+ "70": "#af98ff",
+ "75": "#bbaaff",
+ "80": "#c8bcff",
+ "85": "#d5cdff",
+ "90": "#e3deff",
+ "95": "#f1eeff",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#140531",
+ "10": "#200946",
+ "15": "#2a1159",
+ "20": "#361a6b",
+ "25": "#41247d",
+ "30": "#4c2f8e",
+ "35": "#583a9f",
+ "40": "#6446af",
+ "45": "#7053be",
+ "50": "#7c5fcd",
+ "55": "#886ddb",
+ "60": "#957be9",
+ "65": "#a289f5",
+ "70": "#af98ff",
+ "75": "#bbaaff",
+ "80": "#c8bcff",
+ "85": "#d5cdff",
+ "90": "#e3deff",
+ "95": "#f1eeff",
+ "100": "#ffffff"
+ }
+ },
+ "pink": {
+ "name": "Pink",
+ "light": {
+ "0": "#000000",
+ "5": "#290014",
+ "10": "#3a0020",
+ "15": "#4b002b",
+ "20": "#5d0037",
+ "25": "#6f0043",
+ "30": "#82004f",
+ "35": "#96005c",
+ "40": "#aa0069",
+ "45": "#be0077",
+ "50": "#ce1e83",
+ "55": "#dd3390",
+ "60": "#ec469d",
+ "65": "#f958aa",
+ "70": "#ff73b6",
+ "75": "#ff8fc2",
+ "80": "#ffa8cd",
+ "85": "#ffbfd9",
+ "90": "#ffd5e6",
+ "95": "#ffeaf2",
+ "100": "#ffffff"
+ },
+ "dark": {
+ "0": "#000000",
+ "5": "#290014",
+ "10": "#3a0020",
+ "15": "#4b002b",
+ "20": "#5d0037",
+ "25": "#6f0043",
+ "30": "#82004f",
+ "35": "#94065c",
+ "40": "#a41968",
+ "45": "#b42975",
+ "50": "#c33982",
+ "55": "#d2488e",
+ "60": "#e0579b",
+ "65": "#ee67a9",
+ "70": "#fa78b6",
+ "75": "#ff8fc2",
+ "80": "#ffa8cd",
+ "85": "#ffbfd9",
+ "90": "#ffd5e6",
+ "95": "#ffeaf2",
+ "100": "#ffffff"
+ }
+ }
+} as const;
+
+export default palette;
diff --git a/packages/themes/y2k/src/y2kPalettes.test.ts b/packages/themes/y2k/src/y2kPalettes.test.ts
new file mode 100644
index 0000000000..77d0534255
--- /dev/null
+++ b/packages/themes/y2k/src/y2kPalettes.test.ts
@@ -0,0 +1,68 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+import {describe, expect, it} from 'vitest';
+import {palette as y2kModePalettes} from './y2kPalettes.generated';
+import {y2kPalettes} from './y2kPalettes';
+
+const stops = [
+ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
+ 100,
+] as const;
+const families = [
+ 'neutral',
+ 'accent',
+ 'blue',
+ 'cyan',
+ 'green',
+ 'orange',
+ 'pink',
+ 'purple',
+ 'red',
+ 'teal',
+ 'yellow',
+] as const;
+
+const relativeLuminance = (hex: string): number => {
+ const channels = hex
+ .slice(1)
+ .match(/.{2}/g)!
+ .map(channel => Number.parseInt(channel, 16) / 255)
+ .map(channel =>
+ channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4,
+ );
+ return channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
+};
+
+describe('Y2K palette artifact', () => {
+ it('contains complete monotonic light and dark ramps', () => {
+ expect(new Set(Object.keys(y2kModePalettes))).toEqual(new Set(families));
+ for (const familyName of families) {
+ const family = y2kModePalettes[familyName];
+ for (const mode of ['light', 'dark'] as const) {
+ const values = stops.map(stop => family[mode][stop]);
+ expect(values.every(value => /^#[0-9a-f]{6}$/i.test(value))).toBe(true);
+ expect(values[0]).toBe('#000000');
+ expect(values.at(-1)).toBe('#ffffff');
+ const luminance = values.map(relativeLuminance);
+ expect(
+ luminance.every(
+ (value, index) => index === 0 || value > luminance[index - 1],
+ ),
+ ).toBe(true);
+ }
+ }
+ });
+
+ it('keeps Y2K signature colors exact', () => {
+ expect(y2kModePalettes.accent.light[80]).toBe('#cccffa');
+ expect(y2kModePalettes.green.light[80]).toBe('#c5e17a');
+ expect(y2kModePalettes.green.dark[80]).toBe('#c5e17a');
+ expect(y2kModePalettes.blue.light[20]).toBe('#003454');
+ expect(y2kModePalettes.blue.light[75]).toBe('#70c1ff');
+ expect(y2kModePalettes.blue.light[85]).toBe('#addbff');
+ });
+
+ it('matches the complete released legacy object', () => {
+ expect(y2kPalettes).toMatchSnapshot();
+ });
+});
diff --git a/packages/themes/y2k/src/y2kPalettes.ts b/packages/themes/y2k/src/y2kPalettes.ts
new file mode 100644
index 0000000000..198ceb2aa5
--- /dev/null
+++ b/packages/themes/y2k/src/y2kPalettes.ts
@@ -0,0 +1,257 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/** Y2K's original mode-independent palette API. */
+export const y2kPalettes = {
+ neutral: {
+ hue: 75,
+ chroma: 8,
+ 0: '#000000',
+ 5: '#190f00',
+ 10: '#221a10',
+ 15: '#2d241b',
+ 20: '#382f25',
+ 25: '#433a30',
+ 30: '#4f453b',
+ 35: '#5b5146',
+ 40: '#675d52',
+ 45: '#73695e',
+ 50: '#80756a',
+ 55: '#8d8276',
+ 60: '#9a8f83',
+ 65: '#a79c90',
+ 70: '#b5a99d',
+ 75: '#c3b7ab',
+ 80: '#d1c5b8',
+ 85: '#dfd2c6',
+ 90: '#ede0d4',
+ 95: '#fbefe2',
+ 100: '#ffffff',
+ },
+ green: {
+ hue: 120,
+ chroma: 60,
+ 0: '#000000',
+ 5: '#061800',
+ 10: '#132200',
+ 15: '#152d00',
+ 20: '#173900',
+ 25: '#1e4500',
+ 30: '#285100',
+ 35: '#355d00',
+ 40: '#426900',
+ 45: '#4f7600',
+ 50: '#5c830b',
+ 55: '#69901d',
+ 60: '#779d2c',
+ 65: '#84aa39',
+ 70: '#92b847',
+ 75: '#a0c654',
+ 80: '#aed461',
+ 85: '#bce26e',
+ 90: '#caf07b',
+ 95: '#d9fe89',
+ 100: '#ffffff',
+ },
+ red: {
+ hue: 25,
+ chroma: 55,
+ 0: '#000000',
+ 5: '#480000',
+ 10: '#540000',
+ 15: '#620002',
+ 20: '#700012',
+ 25: '#7f001b',
+ 30: '#8e1126',
+ 35: '#9c2330',
+ 40: '#ab313b',
+ 45: '#ba3f47',
+ 50: '#c94d52',
+ 55: '#d95b5e',
+ 60: '#e8686b',
+ 65: '#f87677',
+ 70: '#ff8787',
+ 75: '#ff9d9b',
+ 80: '#ffb2af',
+ 85: '#ffc6c3',
+ 90: '#ffd9d7',
+ 95: '#ffeceb',
+ 100: '#ffffff',
+ },
+ yellow: {
+ hue: 85,
+ chroma: 65,
+ 0: '#000000',
+ 5: '#270c00',
+ 10: '#301800',
+ 15: '#3b2200',
+ 20: '#472c00',
+ 25: '#533700',
+ 30: '#604200',
+ 35: '#6d4d00',
+ 40: '#7b5900',
+ 45: '#896500',
+ 50: '#977100',
+ 55: '#a67e00',
+ 60: '#b58b01',
+ 65: '#c39819',
+ 70: '#d2a52a',
+ 75: '#e2b239',
+ 80: '#f1c047',
+ 85: '#ffcd55',
+ 90: '#ffde9b',
+ 95: '#ffeecf',
+ 100: '#ffffff',
+ },
+ blue: {
+ hue: 250,
+ chroma: 40,
+ 0: '#000000',
+ 5: '#001939',
+ 10: '#002244',
+ 15: '#002c4d',
+ 20: '#003759',
+ 25: '#004266',
+ 30: '#004e74',
+ 35: '#005a83',
+ 40: '#006693',
+ 45: '#0073a3',
+ 50: '#0080b4',
+ 55: '#008ec4',
+ 60: '#0e9bd2',
+ 65: '#2fa8e0',
+ 70: '#45b6ef',
+ 75: '#57c3fd',
+ 80: '#7ed0ff',
+ 85: '#a3dbff',
+ 90: '#c4e7ff',
+ 95: '#e1f3ff',
+ 100: '#ffffff',
+ },
+ pink: {
+ hue: 350,
+ chroma: 45,
+ 0: '#000000',
+ 5: '#3d001d',
+ 10: '#490027',
+ 15: '#560032',
+ 20: '#64003d',
+ 25: '#711248',
+ 30: '#7f2154',
+ 35: '#8c2f60',
+ 40: '#9a3c6c',
+ 45: '#a84979',
+ 50: '#b75685',
+ 55: '#c56392',
+ 60: '#d371a0',
+ 65: '#e27ead',
+ 70: '#f18bbb',
+ 75: '#ff99c8',
+ 80: '#ffaed3',
+ 85: '#ffc3de',
+ 90: '#ffd7e9',
+ 95: '#ffebf4',
+ 100: '#ffffff',
+ },
+ purple: {
+ hue: 300,
+ chroma: 40,
+ 0: '#000000',
+ 5: '#020840',
+ 10: '#11144b',
+ 15: '#1f1e57',
+ 20: '#2c2864',
+ 25: '#393370',
+ 30: '#453e7d',
+ 35: '#524a8a',
+ 40: '#5f5697',
+ 45: '#6c62a4',
+ 50: '#796eb2',
+ 55: '#867bc0',
+ 60: '#9387ce',
+ 65: '#a194dc',
+ 70: '#afa2ea',
+ 75: '#bdaff8',
+ 80: '#cbbeff',
+ 85: '#d9ceff',
+ 90: '#e6deff',
+ 95: '#f3eeff',
+ 100: '#ffffff',
+ },
+ cyan: {
+ hue: 185,
+ chroma: 35,
+ 0: '#000000',
+ 5: '#001e14',
+ 10: '#00261f',
+ 15: '#003029',
+ 20: '#003b34',
+ 25: '#00473f',
+ 30: '#00534a',
+ 35: '#005f56',
+ 40: '#006c62',
+ 45: '#00796f',
+ 50: '#00867b',
+ 55: '#0f9488',
+ 60: '#29a195',
+ 65: '#3bafa2',
+ 70: '#4cbcb0',
+ 75: '#5bcabd',
+ 80: '#6ad8cb',
+ 85: '#79e7d9',
+ 90: '#87f5e7',
+ 95: '#a6fff5',
+ 100: '#ffffff',
+ },
+ orange: {
+ hue: 60,
+ chroma: 60,
+ 0: '#000000',
+ 5: '#340000',
+ 10: '#420500',
+ 15: '#520b00',
+ 20: '#601700',
+ 25: '#6d2400',
+ 30: '#7b3000',
+ 35: '#893c00',
+ 40: '#984800',
+ 45: '#a75409',
+ 50: '#b66019',
+ 55: '#c56d26',
+ 60: '#d47a33',
+ 65: '#e48740',
+ 70: '#f3944c',
+ 75: '#ffa25c',
+ 80: '#ffb682',
+ 85: '#ffc9a3',
+ 90: '#ffdbc3',
+ 95: '#ffede1',
+ 100: '#ffffff',
+ },
+ teal: {
+ hue: 165,
+ chroma: 30,
+ 0: '#000000',
+ 5: '#001d00',
+ 10: '#00240f',
+ 15: '#002f1a',
+ 20: '#003a24',
+ 25: '#00462f',
+ 30: '#00513a',
+ 35: '#115e45',
+ 40: '#226a51',
+ 45: '#30775d',
+ 50: '#3d8469',
+ 55: '#4a9175',
+ 60: '#589e82',
+ 65: '#65ab8f',
+ 70: '#72b99c',
+ 75: '#7fc7a9',
+ 80: '#8dd5b7',
+ 85: '#9be3c5',
+ 90: '#a9f2d3',
+ 95: '#b6ffe1',
+ 100: '#ffffff',
+ },
+} as const;
+
+export default y2kPalettes;
diff --git a/packages/themes/y2k/src/y2kTheme.test.ts b/packages/themes/y2k/src/y2kTheme.test.ts
index 9b6c3d7f34..855d6839c0 100644
--- a/packages/themes/y2k/src/y2kTheme.test.ts
+++ b/packages/themes/y2k/src/y2kTheme.test.ts
@@ -1,9 +1,31 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+import {readFileSync} from 'node:fs';
import {describe, expect, it} from 'vitest';
import {generateThemeCSS} from '@astryxdesign/core/theme';
+import {palette as y2kModePalettes} from './y2kPalettes.generated';
import {y2kTheme} from './y2kTheme';
+function luminance(color: string): number {
+ const channels = [1, 3, 5]
+ .map(index => Number.parseInt(color.slice(index, index + 2), 16) / 255)
+ .map(channel =>
+ channel <= 0.04045
+ ? channel / 12.92
+ : Math.pow((channel + 0.055) / 1.055, 2.4),
+ );
+ return channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
+}
+
+function contrast(foreground: string, background: string): number {
+ const [lighter, darker] = [luminance(foreground), luminance(background)].sort(
+ (left, right) => right - left,
+ );
+ return (lighter + 0.05) / (darker + 0.05);
+}
+
+const source = readFileSync(new URL('./y2kTheme.ts', import.meta.url), 'utf8');
+
describe('y2k secondary ComplexSelector', () => {
it('keeps the hover fill off a disabled trigger in either form', () => {
expect(generateThemeCSS(y2kTheme).component).toMatch(
@@ -11,3 +33,41 @@ describe('y2k secondary ComplexSelector', () => {
);
});
});
+
+describe('Y2K color token mapping completeness', () => {
+ it('does not redefine the data-visualization color system', () => {
+ expect(
+ Object.keys(y2kTheme.tokens).filter(name =>
+ name.startsWith('--color-data-'),
+ ),
+ ).toEqual([]);
+ });
+
+ it('keeps every root color value concrete', () => {
+ for (const [name, value] of Object.entries(y2kTheme.tokens)) {
+ if (!name.startsWith('--color-')) {
+ continue;
+ }
+ expect(typeof value, name).toBe('string');
+ expect(value, name).toMatch(
+ /^(?:transparent|#[0-9a-f]{6}(?:[0-9a-f]{2})?|light-dark\(#[0-9a-f]{6}(?:[0-9a-f]{2})?, #[0-9a-f]{6}(?:[0-9a-f]{2})?\)|color-mix\(.+\)|var\(.+\))$/i,
+ );
+ }
+ });
+
+ it('uses no one-off color literals in the maintained theme source', () => {
+ expect(source).not.toMatch(
+ /#[0-9a-f]{3,8}\b|\brgba?\(|\bhsl[a]?\(|\boklch\(|\bblack\b|\bwhite\b/i,
+ );
+ });
+
+ it('keeps the necessary dark control outline above non-text contrast', () => {
+ const outline = y2kModePalettes.neutral.dark[45];
+ const surface = y2kModePalettes.neutral.dark[10];
+
+ expect(y2kTheme.tokens['--color-border-emphasized']).toBe(
+ `light-dark(${y2kModePalettes.neutral.light[20]}, ${outline})`,
+ );
+ expect(contrast(outline, surface)).toBeGreaterThanOrEqual(3);
+ });
+});
diff --git a/packages/themes/y2k/src/y2kTheme.ts b/packages/themes/y2k/src/y2kTheme.ts
index 1994eedf70..f1b4be85e1 100644
--- a/packages/themes/y2k/src/y2kTheme.ts
+++ b/packages/themes/y2k/src/y2kTheme.ts
@@ -4,39 +4,53 @@
* Y2K Theme
*
* A bubbly, playful pop theme inspired by early 2000s aesthetics.
- * Periwinkle body (#CCCFFA), charcoal accent, Poppins for body/headings, and
- * Crimson Text for display sizes.
- * Core neutral: H=75 C=8 (warm cream neutral derived from #FFF6ED)
+ * Colors resolve through named stops from Y2K's reviewed light and dark palette.
+ * The signature periwinkle and neon green remain exact anchors.
*/
import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
import {y2kIconRegistry} from './icons';
+import {y2kPaletteRefs} from './y2kPaletteRefs.generated';
+
+const {
+ accent,
+ blue,
+ cyan,
+ green,
+ neutral,
+ orange,
+ pink,
+ purple,
+ red,
+ teal,
+ yellow,
+} = y2kPaletteRefs;
+
+const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;
const y2kSyntax = defineSyntaxTheme({
name: 'astryx-y2k',
tokens: {
- keyword: ['#615a7a', '#aea6ca'],
- string: ['#586242', '#a5af8b'],
- comment: ['#5e5e5e', '#ababab'],
- number: ['#775843', '#c8a48c'],
- function: ['#39637d', '#87b0cd'],
- type: ['#615a7a', '#aea6ca'],
- variable: ['#5e5e5e', '#ababab'],
- operator: ['#5e5e5e', '#ababab'],
- constant: ['#775843', '#c8a48c'],
- tag: ['#7f5351', '#d19f9d'],
- attribute: ['#6c5c3e', '#bca987'],
- property: ['#3c6755', '#87b5a1'],
- punctuation: ['#5e5e5e', '#ababab'],
- background: ['#FFF6ED', '#190f00'],
- // Diff rows: the muted green/red at 25% in light and 20% in dark keep
- // every token at or above 4.5:1 on the tint. Markers: the tinted text
- // tokens in light (7.3:1 / 7.9:1); in dark those tokens are near-black,
- // so the string and tag colours mark the rows (5.1:1 each).
- added: ['#C5E17A40', '#C5E17A33'],
- removed: ['#FFC5C340', '#FFC5C333'],
- 'added-marker': ['#3a5500', '#a5af8b'],
- 'removed-marker': ['#8b1d24', '#d19f9d'],
+ keyword: [purple.light[40], purple.dark[75]],
+ string: [green.light[40], green.dark[65]],
+ comment: [neutral.light[40], neutral.dark[70]],
+ number: [orange.light[40], orange.dark[80]],
+ function: [blue.light[40], blue.dark[75]],
+ type: [purple.light[40], purple.dark[75]],
+ variable: [neutral.light[40], neutral.dark[70]],
+ operator: [neutral.light[40], neutral.dark[70]],
+ constant: [orange.light[40], orange.dark[80]],
+ tag: [red.light[35], red.dark[75]],
+ attribute: [yellow.light[40], yellow.dark[70]],
+ property: [teal.light[40], teal.dark[70]],
+ punctuation: [neutral.light[40], neutral.dark[70]],
+ background: [neutral.light[95], neutral.dark[5]],
+ // Markers stay readable on diff tints in both modes. The closest pairing
+ // is the dark added marker, which remains above the 4.5:1 text threshold.
+ added: [withAlpha(green.light[80], '40'), withAlpha(green.dark[80], '33')],
+ removed: [withAlpha(red.light[85], '40'), withAlpha(red.dark[85], '33')],
+ 'added-marker': [green.light[30], green.dark[65]],
+ 'removed-marker': [red.light[30], red.dark[75]],
},
});
@@ -138,116 +152,131 @@ export const y2kTheme = defineTheme({
// =========================================================================
// Colors — Y2K pop palette
- // Neutral: H=75 C=8 (warm cream)
- // Accent: charcoal (#292427)
// =========================================================================
- // Core semantic — neutral H=75 C=8 (cream)
- '--color-accent': ['#2d241b', '#EDEFFC'],
- '--color-accent-muted': ['#2d241b14', '#EDEFFC20'],
- '--color-neutral': ['#2d241b10', '#EDEFFC1A'],
- '--color-background-surface': ['#FFFFFF', '#16182b'],
- '--color-background-body': ['#CCCFFA', '#0e0f1a'],
- '--color-overlay': ['#2d241b80', '#0a0b14CC'],
- '--color-overlay-hover': ['#2d241b0D', '#EDEFFC0D'],
- '--color-overlay-pressed': ['#2d241b1A', '#EDEFFC1A'],
- '--color-background-muted': ['#ede0d4', '#1f2238'],
-
- // Text — neutral H=75 (cream)
- '--color-text-primary': ['#2d241b', '#EDEFFC'],
- '--color-text-secondary': ['#675d52', '#a6acd6'],
- '--color-text-disabled': ['#d1c5b8', '#4a4f6b'],
- '--color-text-accent': ['#2d241b', '#EDEFFC'],
- '--color-on-dark': '#FFFFFF',
- '--color-on-light': '#2d241b',
- '--color-on-accent': ['#FFFFFF', '#16182b'],
- '--color-on-success': ['#3a5500', '#1e3200'],
- '--color-on-error': ['#8b1d24', '#5c0008'],
- '--color-on-warning': ['#614400', '#3f2600'],
-
- // Icon — neutral H=75 (cream)
- '--color-icon-accent': ['#2d241b', '#EDEFFC'],
- '--color-icon-primary': ['#2d241b', '#EDEFFC'],
- '--color-icon-secondary': ['#675d52', '#a6acd6'],
- '--color-icon-disabled': ['#d1c5b8', '#4a4f6b'],
-
- // Surface variants — white cards, cream body
- '--color-background-card': ['#FFFFFF', '#16182b'],
- '--color-background-popover': ['#FFFFFF', '#1f2238'],
- '--color-background-inverted': ['#2d241b', '#EDEFFC'],
-
- // Status / Sentiment — same in light and dark
- '--color-success': ['#C5E17A', '#C5E17A'],
- '--color-success-muted': ['#C5E17A', '#C5E17A'],
- '--color-error': ['#FFC5C3', '#FFC5C3'],
- '--color-error-muted': ['#FFC5C3', '#FFC5C3'],
- '--color-warning': ['#FFE08A', '#FFE08A'],
- '--color-warning-muted': ['#FFE08A', '#FFE08A'],
-
- // Bold charcoal borders in light mode (default + card) for the heavy-outline
- // Y2K look. Dark mode unchanged.
- '--color-border': ['#2F292E', '#EDEFFC1A'],
- '--color-border-emphasized': ['#2F292E', '#3a3f5e'],
+ // Core semantic colors
+ '--color-accent': [neutral.light[15], neutral.dark[95]],
+ '--color-accent-muted': [
+ withAlpha(neutral.light[15], '14'),
+ withAlpha(neutral.dark[95], '20'),
+ ],
+ '--color-neutral': [
+ withAlpha(neutral.light[15], '10'),
+ withAlpha(neutral.dark[95], '1A'),
+ ],
+ '--color-background-surface': [neutral.light[100], neutral.dark[10]],
+ '--color-background-body': [accent.light[80], neutral.dark[5]],
+ '--color-overlay': [
+ withAlpha(neutral.light[15], '80'),
+ withAlpha(neutral.dark[5], 'CC'),
+ ],
+ '--color-overlay-hover': [
+ withAlpha(neutral.light[15], '0D'),
+ withAlpha(neutral.dark[95], '0D'),
+ ],
+ '--color-overlay-pressed': [
+ withAlpha(neutral.light[15], '1A'),
+ withAlpha(neutral.dark[95], '1A'),
+ ],
+ '--color-background-muted': [neutral.light[90], neutral.dark[20]],
+
+ // Text
+ '--color-text-primary': [neutral.light[15], neutral.dark[95]],
+ '--color-text-secondary': [neutral.light[40], neutral.dark[70]],
+ '--color-text-disabled': [neutral.light[80], neutral.dark[35]],
+ '--color-text-accent': [neutral.light[15], neutral.dark[95]],
+ '--color-on-dark': neutral.light[100],
+ '--color-on-light': neutral.light[15],
+ '--color-on-accent': [neutral.light[100], neutral.dark[10]],
+ '--color-on-success': [green.light[30], green.dark[20]],
+ '--color-on-error': [red.light[30], red.dark[20]],
+ '--color-on-warning': [yellow.light[30], yellow.dark[20]],
+
+ // Icon
+ '--color-icon-accent': [neutral.light[15], neutral.dark[95]],
+ '--color-icon-primary': [neutral.light[15], neutral.dark[95]],
+ '--color-icon-secondary': [neutral.light[40], neutral.dark[70]],
+ '--color-icon-disabled': [neutral.light[80], neutral.dark[35]],
+
+ // Surface variants
+ '--color-background-card': [neutral.light[100], neutral.dark[10]],
+ '--color-background-popover': [neutral.light[100], neutral.dark[20]],
+ '--color-background-inverted': [neutral.light[15], neutral.dark[95]],
+
+ // Status / sentiment
+ '--color-success': [green.light[80], green.dark[80]],
+ '--color-success-muted': [green.light[80], green.dark[80]],
+ '--color-error': [red.light[85], red.dark[85]],
+ '--color-error-muted': [red.light[85], red.dark[85]],
+ '--color-warning': [yellow.light[90], yellow.dark[90]],
+ '--color-warning-muted': [yellow.light[90], yellow.dark[90]],
+
+ // Bold borders preserve the heavy-outline Y2K look.
+ '--color-border': [neutral.light[20], withAlpha(neutral.dark[95], '1A')],
+ '--color-border-emphasized': [neutral.light[20], neutral.dark[45]],
// Effects
- '--color-skeleton': ['#d1c5b8', '#2a2e47'],
- '--color-shadow': ['#2d241b1A', '#0000004D'],
- '--color-tint-hover': ['#2d241b', '#EDEFFC'],
+ '--color-skeleton': [neutral.light[80], neutral.dark[25]],
+ '--color-shadow': [
+ withAlpha(neutral.light[15], '1A'),
+ withAlpha(neutral.dark[0], '4D'),
+ ],
+ '--color-tint-hover': [neutral.light[15], neutral.dark[95]],
// Typography override
'--text-supporting-size': '12px',
- // Categorical — hand-tuned for equal optical brightness, same light/dark
- '--color-background-green': ['#C5E17A', '#C5E17A'],
- '--color-border-green': ['#B5D16A', '#B5D16A'],
- '--color-icon-green': ['#3a5500', '#1e3200'],
- '--color-text-green': ['#3a5500', '#1e3200'],
-
- '--color-background-red': ['#FFC5C3', '#FFC5C3'],
- '--color-border-red': ['#FF9E9A', '#FF9E9A'],
- '--color-icon-red': ['#8b1d24', '#5c0008'],
- '--color-text-red': ['#8b1d24', '#5c0008'],
-
- '--color-background-yellow': ['#FFE08A', '#FFE08A'],
- '--color-border-yellow': ['#FFCC55', '#FFCC55'],
- '--color-icon-yellow': ['#614400', '#3f2600'],
- '--color-text-yellow': ['#614400', '#3f2600'],
-
- '--color-background-blue': ['#B8E0FF', '#B8E0FF'],
- '--color-border-blue': ['#8ECFFF', '#8ECFFF'],
- '--color-icon-blue': ['#004e74', '#002c4d'],
- '--color-text-blue': ['#004e74', '#002c4d'],
-
- '--color-background-pink': ['#FFC8E0', '#FFC8E0'],
- '--color-border-pink': ['#FFA0C8', '#FFA0C8'],
- '--color-icon-pink': ['#822050', '#580030'],
- '--color-text-pink': ['#822050', '#580030'],
-
- '--color-background-purple': ['#DDD0FF', '#DDD0FF'],
- '--color-border-purple': ['#C0AAFF', '#C0AAFF'],
- '--color-icon-purple': ['#453080', '#201058'],
- '--color-text-purple': ['#453080', '#201058'],
-
- '--color-background-cyan': ['#A8F0E2', '#A8F0E2'],
- '--color-border-cyan': ['#70E8D0', '#70E8D0'],
- '--color-icon-cyan': ['#005548', '#003028'],
- '--color-text-cyan': ['#005548', '#003028'],
-
- '--color-background-orange': ['#FFCCA0', '#FFCCA0'],
- '--color-border-orange': ['#FFAA66', '#FFAA66'],
- '--color-icon-orange': ['#703500', '#4a1800'],
- '--color-text-orange': ['#703500', '#4a1800'],
-
- '--color-background-teal': ['#A8EED0', '#A8EED0'],
- '--color-border-teal': ['#78E0B0', '#78E0B0'],
- '--color-icon-teal': ['#005530', '#003018'],
- '--color-text-teal': ['#005530', '#003018'],
-
- // Gray (cream neutral H=75 C=8)
- '--color-background-gray': ['#ede0d4', '#ede0d4'],
- '--color-border-gray': ['#dfd2c6', '#dfd2c6'],
- '--color-icon-gray': ['#4f453b', '#2d241b'],
- '--color-text-gray': ['#4f453b', '#2d241b'],
+ // Categorical colors
+ '--color-background-green': [green.light[80], green.dark[80]],
+ '--color-border-green': [green.light[75], green.dark[75]],
+ '--color-icon-green': [green.light[30], green.dark[20]],
+ '--color-text-green': [green.light[30], green.dark[20]],
+
+ '--color-background-red': [red.light[85], red.dark[85]],
+ '--color-border-red': [red.light[75], red.dark[75]],
+ '--color-icon-red': [red.light[30], red.dark[20]],
+ '--color-text-red': [red.light[30], red.dark[20]],
+
+ '--color-background-yellow': [yellow.light[90], yellow.dark[90]],
+ '--color-border-yellow': [yellow.light[85], yellow.dark[85]],
+ '--color-icon-yellow': [yellow.light[30], yellow.dark[20]],
+ '--color-text-yellow': [yellow.light[30], yellow.dark[20]],
+
+ '--color-background-blue': [blue.light[85], blue.dark[85]],
+ '--color-border-blue': [blue.light[75], blue.dark[75]],
+ '--color-icon-blue': [blue.light[20], blue.dark[20]],
+ '--color-text-blue': [blue.light[20], blue.dark[20]],
+
+ '--color-background-pink': [pink.light[85], pink.dark[85]],
+ '--color-border-pink': [pink.light[80], pink.dark[80]],
+ '--color-icon-pink': [pink.light[30], pink.dark[20]],
+ '--color-text-pink': [pink.light[30], pink.dark[20]],
+
+ '--color-background-purple': [purple.light[85], purple.dark[85]],
+ '--color-border-purple': [purple.light[75], purple.dark[75]],
+ '--color-icon-purple': [purple.light[25], purple.dark[15]],
+ '--color-text-purple': [purple.light[25], purple.dark[15]],
+
+ '--color-background-cyan': [cyan.light[90], cyan.dark[90]],
+ '--color-border-cyan': [cyan.light[80], cyan.dark[80]],
+ '--color-icon-cyan': [cyan.light[30], cyan.dark[15]],
+ '--color-text-cyan': [cyan.light[30], cyan.dark[15]],
+
+ '--color-background-orange': [orange.light[85], orange.dark[85]],
+ '--color-border-orange': [orange.light[80], orange.dark[80]],
+ '--color-icon-orange': [orange.light[30], orange.dark[15]],
+ '--color-text-orange': [orange.light[30], orange.dark[15]],
+
+ '--color-background-teal': [teal.light[90], teal.dark[85]],
+ '--color-border-teal': [teal.light[80], teal.dark[80]],
+ '--color-icon-teal': [teal.light[30], teal.dark[15]],
+ '--color-text-teal': [teal.light[30], teal.dark[15]],
+
+ // Gray
+ '--color-background-gray': [neutral.light[90], neutral.dark[90]],
+ '--color-border-gray': [neutral.light[85], neutral.dark[85]],
+ '--color-icon-gray': [neutral.light[30], neutral.dark[10]],
+ '--color-text-gray': [neutral.light[30], neutral.dark[10]],
// =========================================================================
// Radius — sharp / brutalist (multiplier: 0 via radius config + explicit)
@@ -262,14 +291,14 @@ export const y2kTheme = defineTheme({
// =========================================================================
// Shadows — warm cream neutral
// =========================================================================
- '--shadow-low': '0 2px 4px #2d241b0D, 0 4px 8px #2d241b1A',
- '--shadow-med': '0 2px 4px #2d241b0D, 0 4px 12px #2d241b1A',
- '--shadow-high': '0 4px 6px #2d241b1A, 0 12px 24px #2d241b26',
- '--shadow-inset-hover': 'inset 0px 0px 0px 2px #2d241b30',
- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #2d241b50',
- '--shadow-inset-success': 'inset 0px 0px 0px 2px #3a550050',
- '--shadow-inset-warning': 'inset 0px 0px 0px 2px #61440050',
- '--shadow-inset-error': 'inset 0px 0px 0px 2px #8b1d2450',
+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.light[15], '0D')}, 0 4px 8px ${withAlpha(neutral.light[15], '1A')}`,
+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.light[15], '0D')}, 0 4px 12px ${withAlpha(neutral.light[15], '1A')}`,
+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.light[15], '1A')}, 0 12px 24px ${withAlpha(neutral.light[15], '26')}`,
+ '--shadow-inset-hover': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[15], '30')}`,
+ '--shadow-inset-selected': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[15], '50')}`,
+ '--shadow-inset-success': `inset 0px 0px 0px 2px ${withAlpha(green.light[30], '50')}`,
+ '--shadow-inset-warning': `inset 0px 0px 0px 2px ${withAlpha(yellow.light[30], '50')}`,
+ '--shadow-inset-error': `inset 0px 0px 0px 2px ${withAlpha(red.light[30], '50')}`,
},
components: {
@@ -411,259 +440,3 @@ export const y2kTheme = defineTheme({
icons: y2kIconRegistry,
});
-
-/**
- * Raw tonal palettes — every color at every tone step (0-100 in 5s).
- */
-export const y2kPalettes = {
- neutral: {
- hue: 75,
- chroma: 8,
- 0: '#000000',
- 5: '#190f00',
- 10: '#221a10',
- 15: '#2d241b',
- 20: '#382f25',
- 25: '#433a30',
- 30: '#4f453b',
- 35: '#5b5146',
- 40: '#675d52',
- 45: '#73695e',
- 50: '#80756a',
- 55: '#8d8276',
- 60: '#9a8f83',
- 65: '#a79c90',
- 70: '#b5a99d',
- 75: '#c3b7ab',
- 80: '#d1c5b8',
- 85: '#dfd2c6',
- 90: '#ede0d4',
- 95: '#fbefe2',
- 100: '#ffffff',
- },
- green: {
- hue: 120,
- chroma: 60,
- 0: '#000000',
- 5: '#061800',
- 10: '#132200',
- 15: '#152d00',
- 20: '#173900',
- 25: '#1e4500',
- 30: '#285100',
- 35: '#355d00',
- 40: '#426900',
- 45: '#4f7600',
- 50: '#5c830b',
- 55: '#69901d',
- 60: '#779d2c',
- 65: '#84aa39',
- 70: '#92b847',
- 75: '#a0c654',
- 80: '#aed461',
- 85: '#bce26e',
- 90: '#caf07b',
- 95: '#d9fe89',
- 100: '#ffffff',
- },
- red: {
- hue: 25,
- chroma: 55,
- 0: '#000000',
- 5: '#480000',
- 10: '#540000',
- 15: '#620002',
- 20: '#700012',
- 25: '#7f001b',
- 30: '#8e1126',
- 35: '#9c2330',
- 40: '#ab313b',
- 45: '#ba3f47',
- 50: '#c94d52',
- 55: '#d95b5e',
- 60: '#e8686b',
- 65: '#f87677',
- 70: '#ff8787',
- 75: '#ff9d9b',
- 80: '#ffb2af',
- 85: '#ffc6c3',
- 90: '#ffd9d7',
- 95: '#ffeceb',
- 100: '#ffffff',
- },
- yellow: {
- hue: 85,
- chroma: 65,
- 0: '#000000',
- 5: '#270c00',
- 10: '#301800',
- 15: '#3b2200',
- 20: '#472c00',
- 25: '#533700',
- 30: '#604200',
- 35: '#6d4d00',
- 40: '#7b5900',
- 45: '#896500',
- 50: '#977100',
- 55: '#a67e00',
- 60: '#b58b01',
- 65: '#c39819',
- 70: '#d2a52a',
- 75: '#e2b239',
- 80: '#f1c047',
- 85: '#ffcd55',
- 90: '#ffde9b',
- 95: '#ffeecf',
- 100: '#ffffff',
- },
- blue: {
- hue: 250,
- chroma: 40,
- 0: '#000000',
- 5: '#001939',
- 10: '#002244',
- 15: '#002c4d',
- 20: '#003759',
- 25: '#004266',
- 30: '#004e74',
- 35: '#005a83',
- 40: '#006693',
- 45: '#0073a3',
- 50: '#0080b4',
- 55: '#008ec4',
- 60: '#0e9bd2',
- 65: '#2fa8e0',
- 70: '#45b6ef',
- 75: '#57c3fd',
- 80: '#7ed0ff',
- 85: '#a3dbff',
- 90: '#c4e7ff',
- 95: '#e1f3ff',
- 100: '#ffffff',
- },
- pink: {
- hue: 350,
- chroma: 45,
- 0: '#000000',
- 5: '#3d001d',
- 10: '#490027',
- 15: '#560032',
- 20: '#64003d',
- 25: '#711248',
- 30: '#7f2154',
- 35: '#8c2f60',
- 40: '#9a3c6c',
- 45: '#a84979',
- 50: '#b75685',
- 55: '#c56392',
- 60: '#d371a0',
- 65: '#e27ead',
- 70: '#f18bbb',
- 75: '#ff99c8',
- 80: '#ffaed3',
- 85: '#ffc3de',
- 90: '#ffd7e9',
- 95: '#ffebf4',
- 100: '#ffffff',
- },
- purple: {
- hue: 300,
- chroma: 40,
- 0: '#000000',
- 5: '#020840',
- 10: '#11144b',
- 15: '#1f1e57',
- 20: '#2c2864',
- 25: '#393370',
- 30: '#453e7d',
- 35: '#524a8a',
- 40: '#5f5697',
- 45: '#6c62a4',
- 50: '#796eb2',
- 55: '#867bc0',
- 60: '#9387ce',
- 65: '#a194dc',
- 70: '#afa2ea',
- 75: '#bdaff8',
- 80: '#cbbeff',
- 85: '#d9ceff',
- 90: '#e6deff',
- 95: '#f3eeff',
- 100: '#ffffff',
- },
- cyan: {
- hue: 185,
- chroma: 35,
- 0: '#000000',
- 5: '#001e14',
- 10: '#00261f',
- 15: '#003029',
- 20: '#003b34',
- 25: '#00473f',
- 30: '#00534a',
- 35: '#005f56',
- 40: '#006c62',
- 45: '#00796f',
- 50: '#00867b',
- 55: '#0f9488',
- 60: '#29a195',
- 65: '#3bafa2',
- 70: '#4cbcb0',
- 75: '#5bcabd',
- 80: '#6ad8cb',
- 85: '#79e7d9',
- 90: '#87f5e7',
- 95: '#a6fff5',
- 100: '#ffffff',
- },
- orange: {
- hue: 60,
- chroma: 60,
- 0: '#000000',
- 5: '#340000',
- 10: '#420500',
- 15: '#520b00',
- 20: '#601700',
- 25: '#6d2400',
- 30: '#7b3000',
- 35: '#893c00',
- 40: '#984800',
- 45: '#a75409',
- 50: '#b66019',
- 55: '#c56d26',
- 60: '#d47a33',
- 65: '#e48740',
- 70: '#f3944c',
- 75: '#ffa25c',
- 80: '#ffb682',
- 85: '#ffc9a3',
- 90: '#ffdbc3',
- 95: '#ffede1',
- 100: '#ffffff',
- },
- teal: {
- hue: 165,
- chroma: 30,
- 0: '#000000',
- 5: '#001d00',
- 10: '#00240f',
- 15: '#002f1a',
- 20: '#003a24',
- 25: '#00462f',
- 30: '#00513a',
- 35: '#115e45',
- 40: '#226a51',
- 45: '#30775d',
- 50: '#3d8469',
- 55: '#4a9175',
- 60: '#589e82',
- 65: '#65ab8f',
- 70: '#72b99c',
- 75: '#7fc7a9',
- 80: '#8dd5b7',
- 85: '#9be3c5',
- 90: '#a9f2d3',
- 95: '#b6ffe1',
- 100: '#ffffff',
- },
-} as const;
diff --git a/packages/themes/y2k/y2k.spec.md b/packages/themes/y2k/y2k.spec.md
new file mode 100644
index 0000000000..28824b6dfa
--- /dev/null
+++ b/packages/themes/y2k/y2k.spec.md
@@ -0,0 +1,217 @@
+---
+schema_version: 2
+template_version: 2
+kind: theme
+id: theme:y2k
+authority: current
+approved_by: rubyycheung
+approved_at: 2026-10-17
+review_triggers:
+ [tokens, palette-values, component-mappings, contrast, artifacts]
+verified_by:
+ [
+ packages/themes/y2k/src/y2kTheme.test.ts,
+ packages/themes/y2k/src/y2kColorMapping.test.ts,
+ packages/themes/y2k/src/y2kPalettes.test.ts,
+ scripts/generate-y2k-palette-refs.test.mjs,
+ ]
+package: '@astryxdesign/theme-y2k'
+source_theme: packages/themes/y2k/src/y2kTheme.ts
+references:
+ [
+ architecture:theme-authoring-contract,
+ architecture:theme-tokens,
+ architecture:theme-compilation,
+ ]
+---
+
+# Y2K theme specification
+
+## Intent and audience
+
+Y2K is a playful high-chroma theme with signature Periwinkle, Neon Green, airy
+Electric Blue, and bright pastel categorical colors. It serves expressive
+interfaces that want digital-pop character while retaining semantic hierarchy
+in light and dark modes.
+
+## Inheritance and base
+
+Y2K starts from Astryx core defaults and overrides selected typography, spacing,
+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`. Y2K owns its light and dark
+surface ladders, signature accents, status and categorical selections, syntax
+colors, color-bearing shadows, and existing component mappings. Portable token
+vocabulary remains owned by `architecture:theme-tokens`.
+
+## Theme-local role definitions
+
+Y2K defines no public theme-local token names. Its package-specific decisions
+use existing portable tokens and component mapping slots.
+
+## Tonal palette definitions
+
+Y2K owns complete private light and dark ramps for neutral, accent, blue, cyan,
+green, orange, pink, purple, red, teal, and yellow. Its light neutral keeps the
+warm canvas, while the dark neutral follows the navy dark surfaces from `#0E0F1A`
+toward lavender `#EDEFFC`. The committed request, generated module, and receipt
+reproduce the accepted `astryx-oklch-v1` result.
+
+Accent Light 80 is exact Periwinkle `#CCCFFA`. Green Light and Dark 80 are exact
+Neon Green `#C5E17A`. Electric Blue is anchorless; mapped Blue roles use Surface
+85 `#ADDBFF`, Border 75 `#70C1FF`, and foreground 20 `#003454`.
+
+Palette generation is explicit maintenance work and never runs during a normal
+theme build.
+
+## Component and state mappings
+
+Y2K maps existing semantic, categorical, syntax, and color-bearing effect roles
+to named Y2K palette stops. Neon Green supplies both success and Green category
+roles. Electric Blue keeps airy surfaces while increasing saturation. Components
+consume semantic tokens rather than the complete palette.
+
+Y2K defines no additional component states or data-visualization colors.
+
+## Compatibility and migration
+
+The released `y2kPalettes` object remains byte-identical in its established
+package export. Complete mode-aware ramps remain private to authoring, mapping,
+tests, and review tooling.
+
+Consumers can extend `y2kTheme` and override color, syntax, shadow, and component
+values while preserving the released package contract.
+
+## Accessibility and contrast evidence
+
+Y2K-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.
+
+The known light-mode text exception is secondary text
+(`--color-text-secondary`) on the Periwinkle body
+(`--color-background-body`), which measures 4.25:1.
+
+The dark neutral border audit suppresses each border and checks whether another
+visible cue still identifies the component or state:
+
+| Component or state | Border role and removal result | Requirement and result |
+| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| Resting Selector, text input, and InputGroup members | Without the emphasized border, the input surface is only 1.09:1 against the body and the editable or selectable boundary becomes materially less identifiable. | The boundary is necessary. Neutral Dark 45 `#636889` measures 3.23:1 on the `#16182B` input surface. |
+| Unchecked Checkbox and Radio | Without the emphasized outline, the empty control disappears into its surface and leaves only the adjacent label and spacing; those cues do not identify the unchecked control's shape or target. | The outline is necessary and uses the same passing 3.23:1 Neutral Dark 45 pairing. |
+| Checked or indeterminate Checkbox and Radio | Accent fill plus the check, bar, or radio dot independently identifies the state. | The low neutral border is not the state cue; the accent treatment remains authoritative. |
+| Decorative container edges using `--color-border` | Removing the edge does not erase a control or state; fill, content, spacing, grouping, or elevation still identifies the surface. | The inherited 1.31:1 dark default border is decorative and is not required to meet 3:1. |
+| Disabled controls | Their reduced treatment is not used to identify an available interaction. | WCAG's inactive-component exception applies. |
+
+Focus and semantic-status states continue to use their dedicated accent or status
+rims and visible icons or text rather than the resting neutral border alone.
+
+## Build and artifact contract
+
+The package and CLI template carry identical palette requests, generated
+candidates, receipts, selected-reference modules, and theme mappings. The
+selected-reference module is deterministically derived from `source_theme` and
+the committed private palette. A non-writing check fails for missing, extra,
+stale, or invalid references.
+
+Normal package builds consume committed references and never regenerate palette
+values.
+
+## Verification map
+
+| Theme contract | Evidence | Representative states | Failure signal |
+| ----------------------- | ---------------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------- |
+| Palette identity | Config, generated module, receipt, reproduction test | light and dark; every family | Regeneration changes accepted values or stable provenance. |
+| Signature colors | Palette and mapping tests | Periwinkle; Neon Green; Electric Blue | An exact anchor or approved mapped Blue value moves. |
+| Role mapping | Y2K mapping and theme tests | semantic, categorical, syntax, effects | A maintained role bypasses selected Y2K references. |
+| Public compatibility | Legacy object test and package build | keys and every released value | The released object differs from its established shape or values. |
+| Package/template parity | Byte comparison and build | package and CLI template | Copies diverge. |
+
+## Decision log
+
+### DEC-1 — Y2K owns one reproducible mode-aware palette
+
+**Reference:** `theme:y2k/DEC-1`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Y2K keeps its Periwinkle canvas, Neon Green, airy Electric Blue, and digital-pop
+categorical identity in complete private light and dark ramps. Request,
+generated result, receipt, and visual evidence change together.
+
+Rejected: inheriting another theme's palette or regenerating values during
+normal builds.
+
+### DEC-2 — Periwinkle and Neon Green remain exact
+
+**Reference:** `theme:y2k/DEC-2`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Accent Light 80 remains `#CCCFFA`. Green Light and Dark 80 remain `#C5E17A` and
+supply both Neon Green category and success roles.
+
+Rejected: approximating either signature color with an unanchored stop.
+
+### DEC-3 — Electric Blue stays airy and saturated
+
+**Reference:** `theme:y2k/DEC-3`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Electric Blue remains anchorless. Surface roles use stop 85 `#ADDBFF`, borders
+use stop 75 `#70C1FF`, and dark foreground roles use stop 20 `#003454` so Blue
+stays bright without becoming a dark block.
+
+Rejected: moving Blue surfaces to stop 80 or lower.
+
+### DEC-4 — Existing roles use selected Y2K palette references
+
+**Reference:** `theme:y2k/DEC-4`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Y2K's semantic, categorical, syntax, and color-bearing effect values use named
+Y2K palette stops. Alpha variants derive from selected stops, and mappings
+preserve role intent rather than applying blind nearest-color matches.
+
+Rejected: adding data-visualization overrides or letting components consume the
+complete private palette.
+
+### DEC-5 — The released palette object stays compatible
+
+**Reference:** `theme:y2k/DEC-5`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+`y2kPalettes` keeps its released shape and values. Complete mode-aware ramps
+remain private authoring data.
+
+Rejected: forcing existing consumers onto the generated palette shape.
+
+### DEC-6 — Runtime references are deterministic and minimal
+
+**Reference:** `theme:y2k/DEC-6`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Y2K's selected-reference module contains exactly the family, mode, and stop
+values referenced by the maintained theme. Write mode synchronizes package and
+CLI-template outputs; check mode compares the complete projection without
+writing.
+
+Rejected: bundling the complete private palette or maintaining a manual
+selection manifest.
+
+## Open questions
+
+- **OQ1 — Shared non-text contrast applicability** (`human-design`): Which
+ current design record owns the cross-theme suppression method and independent
+ cue rule? Y2K owns only the component/state matrix, measured pairings, and
+ theme mappings above; applying the method to other themes waits on a current
+ global authority.
+
+## Content boundary
+
+This record owns Y2K'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/scripts/generate-y2k-palette-refs.mjs b/scripts/generate-y2k-palette-refs.mjs
new file mode 100644
index 0000000000..9e7bdab4ef
--- /dev/null
+++ b/scripts/generate-y2k-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/y2k/src/y2kTheme.ts';
+export const FULL_PALETTE_REL =
+ 'packages/themes/y2k/src/y2kPalettes.generated.ts';
+export const SELECTED_REFS_REL =
+ 'packages/themes/y2k/src/y2kPaletteRefs.generated.ts';
+export const TEMPLATE_REFS_REL =
+ 'packages/cli/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts';
+
+const generator = createSelectedPaletteRefGenerator({
+ themeDisplayName: 'Y2K',
+ paletteRefsIdentifier: 'y2kPaletteRefs',
+ themeSourceRel: THEME_SOURCE_REL,
+ fullPaletteRel: FULL_PALETTE_REL,
+ selectedRefsRel: SELECTED_REFS_REL,
+ templateRefsRel: TEMPLATE_REFS_REL,
+ regenerateCommand: 'pnpm generate:y2k-palette-refs',
+});
+
+export function generateY2KPaletteRefs({root = ROOT, check = false} = {}) {
+ return generator.generateSelectedPaletteRefs({root, check});
+}
+
+function main() {
+ const check = process.argv.includes('--check');
+ const result = generateY2KPaletteRefs({check});
+ const count = countSelectedRefs(result.selected);
+
+ if (check && result.problems.length > 0) {
+ process.stderr.write(
+ `\nY2K selected palette refs are out of sync:\n` +
+ result.problems
+ .map(
+ problem =>
+ ` - ${path.relative(ROOT, problem.output)} ${problem.reason}`,
+ )
+ .join('\n') +
+ `\nRun: pnpm generate:y2k-palette-refs\n\n`,
+ );
+ return 1;
+ }
+
+ if (check) {
+ process.stdout.write(
+ `Y2K 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-y2k-palette-refs.test.mjs b/scripts/generate-y2k-palette-refs.test.mjs
new file mode 100644
index 0000000000..ef0b15a22a
--- /dev/null
+++ b/scripts/generate-y2k-palette-refs.test.mjs
@@ -0,0 +1,145 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file Focused tests for Y2K's selected palette-reference wrapper.
+ * @input Synthetic Y2K theme references and full-palette literals.
+ * @output Proof that Y2K binds the shared generator to both required outputs.
+ * @position Regression coverage for generate-y2k-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,
+ generateY2KPaletteRefs,
+} from './generate-y2k-palette-refs.mjs';
+
+const FULL_PALETTE = `export const palette = {
+ blue: {
+ name: 'Blue',
+ dark: {25: '#778899', 80: '#aabbcc'},
+ },
+ neutral: {
+ name: 'Y2K Neutral',
+ dark: {5: '#111111'},
+ },
+} as const;
+`;
+
+const THEME_SOURCE = `
+const {blue: y2kBlue, neutral} = y2kPaletteRefs;
+export const y2kTheme = {
+ first: y2kBlue.dark[80],
+ direct: y2kPaletteRefs.blue.dark[25],
+ repeated: y2kBlue.dark[80],
+ surface: neutral.dark[5],
+};
+`;
+
+describe('Y2K 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-y2k-palette-'));
+ try {
+ fs.copyFileSync(
+ path.join(root, 'packages/themes/y2k/palette.config.json'),
+ path.join(temp, 'palette.config.json'),
+ );
+ themePaletteGenerate(
+ 'palette.config.json',
+ {
+ out: 'y2kPalettes.generated.ts',
+ preview: 'y2k-palette-preview.html',
+ },
+ {cwd: temp},
+ );
+
+ const generated = fs.readFileSync(
+ path.join(temp, 'y2kPalettes.generated.ts'),
+ 'utf8',
+ );
+ const committed = fs
+ .readFileSync(
+ path.join(root, 'packages/themes/y2k/src/y2kPalettes.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, 'y2kPalettes.generated.receipt.json'),
+ 'utf8',
+ ),
+ ),
+ JSON.parse(
+ fs.readFileSync(
+ path.join(
+ root,
+ 'packages/themes/y2k/src/y2kPalettes.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-y2k-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 = generateY2KPaletteRefs({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 Y2K's",
+ );
+ expect(generated.content).toContain(
+ '// theme source. Regenerate with `pnpm generate:y2k-palette-refs`.',
+ );
+ expect(generated.content).toContain('export const y2kPaletteRefs = {');
+ expect(generated.content).toContain(
+ "dark: {25: '#778899', 80: '#aabbcc'}",
+ );
+ expect(generated.content).toContain('export default y2kPaletteRefs;');
+ for (const output of generated.outputs) {
+ expect(fs.readFileSync(output, 'utf-8')).toBe(generated.content);
+ }
+
+ expect(generateY2KPaletteRefs({root, check: true}).problems).toEqual([]);
+ fs.appendFileSync(path.join(root, TEMPLATE_REFS_REL), '// stale\n');
+ expect(generateY2KPaletteRefs({root, check: true}).problems).toEqual([
+ {output: path.join(root, TEMPLATE_REFS_REL), reason: 'differs'},
+ ]);
+ } finally {
+ fs.rmSync(root, {recursive: true, force: true});
+ }
+ });
+});