Skip to content

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

TypeScript

Adopt reviewed Gothic palette (#7670)

rubyycheung3f6ea7d78bfc
diff --git a/.changeset/gothic-reviewed-palette.md b/.changeset/gothic-reviewed-palette.md
new file mode 100644
index 0000000000..f727f31b04
--- /dev/null
+++ b/.changeset/gothic-reviewed-palette.md
@@ -0,0 +1,8 @@
+---
+'@astryxdesign/theme-gothic': patch
+'@astryxdesign/cli': patch
+---
+
+[feat] Keep Gothic's released flat `gothicPalettes` compatibility export unchanged while moving the maintained dark theme to a reproducible generated palette and named stop mappings. The card changes from `#1A1D20` to `#191D20`; Gray background and border from `#3D4248` / `#5D646B` to `#3E454B` / `#5E676E`; syntax comment and punctuation from `#6B7079` / `#7A8290` to `#7E8791` / `#7E8791`; and diff backgrounds from `#081408` / `#1E0A0A` to `#071607` / `#220806`. Success, warning, and error inset rings move from `#87B06A50` / `#D6B56A50` / `#D4485150` to `#869B7250` / `#D3C49050` / `#C6A6A250`. Yellow text moves from `#6C5010` to `#573F0B`, and Pink text from `#71223C` to `#5C182F`; both darker named stops clear 4.5:1 on their categorical surfaces. Consumers that need the former appearance can extend `gothicTheme` and override these color, syntax, shadow, and component tokens with their previous values. The CLI template ships the same request, receipt, and runtime-sized references.
+
+@rubyycheung
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/gothic-palette/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/gothic-palette/page.tsx
index 936effad1d..f6be27039c 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/gothic-palette/page.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/gothic-palette/page.tsx
@@ -4,30 +4,74 @@
import {VStack} from '@astryxdesign/core/Layout';
import {gothicTheme} from '@astryxdesign/theme-gothic/built';
-// `gothicPalettes` is only exported from the source entry, not /built.
-import {gothicPalettes} from '@astryxdesign/theme-gothic';
+import {palette as gothicModePalettes} from '../../../../../../../packages/themes/gothic/src/gothicPalettes.generated';
import {ThemePalettePreview} from '@/components/ThemePalettePreview';
import type {TonalColor} from '@/components/ThemePalettePreview';
const GOTHIC =
'"Manufacturing Consent", "UnifrakturMaguntia", "Old English Text MT", serif';
+// Gothic is dark-only: preview the reviewed dark ramps the maintained theme
+// consumes, not the frozen public compatibility snapshot.
const TONAL_COLORS: TonalColor[] = [
- {name: 'Gothic Neutral', sourceHex: '#96A0AB', note: 'cool blue-gray', tones: gothicPalettes.neutral},
- {name: 'Green', sourceHex: '#b3c79a', semantic: 'Success / sage moss', tones: gothicPalettes.green},
- {name: 'Red', sourceHex: '#c6a6a2', semantic: 'Error / dusty rose', tones: gothicPalettes.red},
- {name: 'Yellow', sourceHex: '#d3c490', semantic: 'Warning / aged gold', tones: gothicPalettes.yellow},
- {name: 'Blue', sourceHex: '#a3b5d6', note: 'periwinkle midnight', tones: gothicPalettes.blue},
- {name: 'Purple', sourceHex: '#b29bc4', note: 'muted plum', tones: gothicPalettes.purple},
- {name: 'Pink', sourceHex: '#c89aab', note: 'dusty rose', tones: gothicPalettes.pink},
- {name: 'Cyan', sourceHex: '#a3c2cf', note: 'cathedral mist', tones: gothicPalettes.cyan},
- {name: 'Orange', sourceHex: '#d3b89a', note: 'warm tan', tones: gothicPalettes.orange},
- {name: 'Teal', sourceHex: '#a3c2b6', note: 'sage verdigris', tones: gothicPalettes.teal},
+ {
+ name: 'Gothic Neutral',
+ sourceHex: '#5D646B',
+ tones: gothicModePalettes.neutral.dark,
+ },
+ {
+ name: 'Green',
+ sourceHex: '#779E5D',
+ semantic: 'Success / forest moss',
+ tones: gothicModePalettes.green.dark,
+ },
+ {
+ name: 'Red',
+ sourceHex: '#7D5E51',
+ semantic: 'Error / blood crimson',
+ tones: gothicModePalettes.red.dark,
+ },
+ {
+ name: 'Yellow',
+ sourceHex: '#CCA74C',
+ semantic: 'Warning / aged gold',
+ tones: gothicModePalettes.yellow.dark,
+ },
+ {
+ name: 'Blue',
+ sourceHex: '#6170BF',
+ tones: gothicModePalettes.blue.dark,
+ },
+ {
+ name: 'Purple',
+ sourceHex: '#A363BD',
+ tones: gothicModePalettes.purple.dark,
+ },
+ {
+ name: 'Pink',
+ sourceHex: '#B15876',
+ tones: gothicModePalettes.pink.dark,
+ },
+ {
+ name: 'Cyan',
+ sourceHex: '#6A9EB1',
+ tones: gothicModePalettes.cyan.dark,
+ },
+ {
+ name: 'Orange',
+ sourceHex: '#C87A4A',
+ tones: gothicModePalettes.orange.dark,
+ },
+ {
+ name: 'Teal',
+ sourceHex: '#5AA091',
+ tones: gothicModePalettes.teal.dark,
+ },
];
const CORE = [
{hex: '#101314', name: 'Body / Surface'},
- {hex: '#1a1d20', name: 'Card'},
+ {hex: '#191D20', name: 'Card'},
{hex: '#24292D', name: 'Popover'},
{hex: '#495056', name: 'Border emp.'},
{hex: '#96A0AB', name: 'Text secondary'},
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 e65bab785e..3c06e58527 100644
--- a/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts
+++ b/apps/sandbox/src/app/(sandbox)/pages/palette-generator/themeCorpus.ts
@@ -1,7 +1,7 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
import {butterPalettes} from '@astryxdesign/theme-butter';
-import {gothicPalettes} from '@astryxdesign/theme-gothic';
+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';
@@ -234,19 +234,19 @@ const gothicFamilies = [
storedFamily(
'neutral',
'Gothic Neutral',
- '#96a0ab',
- gothicPalettes.neutral,
+ '#5d646b',
+ gothicModePalettes.neutral.dark,
'neutral',
),
- storedFamily('green', 'Green', '#b3c79a', gothicPalettes.green),
- storedFamily('red', 'Red', '#c6a6a2', gothicPalettes.red),
- storedFamily('yellow', 'Yellow', '#d3c490', gothicPalettes.yellow),
- storedFamily('blue', 'Blue', '#a3b5d6', gothicPalettes.blue),
- storedFamily('purple', 'Purple', '#b29bc4', gothicPalettes.purple),
- storedFamily('pink', 'Pink', '#c89aab', gothicPalettes.pink),
- storedFamily('cyan', 'Cyan', '#a3c2cf', gothicPalettes.cyan),
- storedFamily('orange', 'Orange', '#d3b89a', gothicPalettes.orange),
- storedFamily('teal', 'Teal', '#a3c2b6', gothicPalettes.teal),
+ storedFamily('green', 'Green', '#779e5d', gothicModePalettes.green.dark),
+ storedFamily('red', 'Red', '#7d5e51', gothicModePalettes.red.dark),
+ storedFamily('yellow', 'Yellow', '#cca74c', gothicModePalettes.yellow.dark),
+ storedFamily('blue', 'Blue', '#6170bf', gothicModePalettes.blue.dark),
+ storedFamily('purple', 'Purple', '#a363bd', gothicModePalettes.purple.dark),
+ storedFamily('pink', 'Pink', '#b15876', gothicModePalettes.pink.dark),
+ storedFamily('cyan', 'Cyan', '#6a9eb1', gothicModePalettes.cyan.dark),
+ storedFamily('orange', 'Orange', '#c87a4a', gothicModePalettes.orange.dark),
+ storedFamily('teal', 'Teal', '#5aa091', gothicModePalettes.teal.dark),
].map(family => ({...family, light: undefined, sharedAcrossModes: false}));
const y2kFamilies = [
diff --git a/docs/themes/README.md b/docs/themes/README.md
index bc00d1f6de..00f7572afc 100644
--- a/docs/themes/README.md
+++ b/docs/themes/README.md
@@ -15,6 +15,7 @@ Current records:
- [Neutral](../../packages/themes/neutral/neutral.spec.md) — current
- [Stone](../../packages/themes/stone/stone.spec.md) — current
+- [Gothic](../../packages/themes/gothic/gothic.spec.md) — current
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 1de61b5eee..24a4633f91 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,8 @@
"check:neutral-palette-refs": "node scripts/generate-neutral-palette-refs.mjs --check",
"generate:stone-palette-refs": "node scripts/generate-stone-palette-refs.mjs",
"check:stone-palette-refs": "node scripts/generate-stone-palette-refs.mjs --check",
+ "generate:gothic-palette-refs": "node scripts/generate-gothic-palette-refs.mjs",
+ "check:gothic-palette-refs": "node scripts/generate-gothic-palette-refs.mjs --check",
"dev": "pnpm -F @astryxdesign/storybook dev",
"test": "vitest run",
"test:watch": "vitest",
@@ -18,7 +20,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: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: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/gothic/gothicPaletteRefs.generated.ts b/packages/cli/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts
new file mode 100644
index 0000000000..f3d220184b
--- /dev/null
+++ b/packages/cli/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts
@@ -0,0 +1,41 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+// Generated from the committed full palette for the stops used by Gothic's
+// theme source. Regenerate with `pnpm generate:gothic-palette-refs`.
+// Keep the complete palette available for authoring and audits without
+// making consumers pay for unused palette stops.
+// prettier-ignore
+export const gothicPaletteRefs = {
+ purple: {
+ dark: {20: '#481b58', 30: '#5a2370', 60: '#947da6', 75: '#b29bc4', 80: '#c39adb'},
+ },
+ green: {
+ dark: {5: '#071607', 20: '#244023', 30: '#3a5e2c', 55: '#869b72', 60: '#96a880', 70: '#a3c987', 75: '#b3c79a'},
+ },
+ neutral: {
+ dark: {0: '#000000', 10: '#101314', 15: '#191d20', 20: '#24292d', 35: '#3e454b', 40: '#495056', 50: '#5e676e', 65: '#7e8791', 75: '#96a0ab', 95: '#e8f1f6', 100: '#ffffff'},
+ },
+ yellow: {
+ dark: {15: '#573f0b', 30: '#876515', 60: '#b6a775', 65: '#e6b85e', 70: '#dec074', 75: '#d3c490'},
+ },
+ blue: {
+ dark: {20: '#1f2c54', 30: '#2a3b6e', 60: '#8696b8', 65: '#8aa1d8', 75: '#a3b5d6'},
+ },
+ pink: {
+ dark: {15: '#5c182f', 30: '#8d2d4c', 60: '#aa7d8e', 65: '#d97580', 75: '#c89aab'},
+ },
+ teal: {
+ dark: {20: '#174a40', 30: '#1f5e52', 60: '#86a499', 70: '#7cc5b3', 75: '#a3c2b6'},
+ },
+ red: {
+ dark: {5: '#220806', 20: '#4a2520', 30: '#5e3a35', 60: '#a48581', 75: '#c6a6a2'},
+ },
+ cyan: {
+ dark: {20: '#204858', 30: '#2a5e75', 60: '#86a4b1', 75: '#a3c2cf'},
+ },
+ orange: {
+ dark: {20: '#6e3812', 30: '#8a4818', 60: '#b6987d', 75: '#d3b89a'},
+ },
+} as const;
+
+export default gothicPaletteRefs;
diff --git a/packages/cli/assets/templates/themes/gothic/gothicPalettes.generated.receipt.json b/packages/cli/assets/templates/themes/gothic/gothicPalettes.generated.receipt.json
new file mode 100644
index 0000000000..0722a31937
--- /dev/null
+++ b/packages/cli/assets/templates/themes/gothic/gothicPalettes.generated.receipt.json
@@ -0,0 +1,979 @@
+{
+ "schemaVersion": 1,
+ "recipe": "astryx-oklch-v1",
+ "generatorVersion": "palette-generator-v1",
+ "candidateFormatVersion": "palette-typescript-v1",
+ "candidateSha256": "e4496b338ca52524b0150cb28893a4ccc9bfa376227454c77791755caaa242df",
+ "preview": {
+ "version": "palette-preview-v1",
+ "sha256": "51e36040e9e78a2c83b65e498bb99a6deb43842ed5c43c17740b2da36fa52d3b"
+ },
+ "request": {
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 36,
+ "neutralProfile": "custom",
+ "modeStrategy": "dark-only",
+ "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": "Gothic Neutral",
+ "seed": "#5d646b",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#101314",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#24292d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 40,
+ "color": "#495056",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#96a0ab",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#e8f1f6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Blood Crimson",
+ "seed": "#7d5e51",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#4a2520",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5e3a35",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#a48581",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c6a6a2",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "orange",
+ "name": "Rust Copper",
+ "seed": "#c87a4a",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6e3812",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8a4818",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6987d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3b89a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "yellow",
+ "name": "Aged Gold",
+ "seed": "#cca74c",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6c5010",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#876515",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6a775",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#e6b85e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#dec074",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3c490",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "green",
+ "name": "Forest Moss",
+ "seed": "#779e5d",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#244023",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#3a5e2c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#96a880",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a3c987",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b3c79a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Verdigris",
+ "seed": "#5aa091",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#174a40",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#1f5e52",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a499",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#7cc5b3",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2b6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "cyan",
+ "name": "Cathedral Mist",
+ "seed": "#6a9eb1",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#204858",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a5e75",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a4b1",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2cf",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "blue",
+ "name": "Midnight Indigo",
+ "seed": "#6170bf",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2c54",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a3b6e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#8696b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#8aa1d8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3b5d6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "purple",
+ "name": "Cathedral Plum",
+ "seed": "#a363bd",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#481b58",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5a2370",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#947da6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b29bc4",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c39adb",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "pink",
+ "name": "Rose Madder",
+ "seed": "#b15876",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#71223c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8d2d4c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#aa7d8e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#d97580",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c89aab",
+ "policy": "exact"
+ }
+ ]
+ }
+ ]
+ },
+ "diagnostics": {
+ "families": {
+ "neutral": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.724361507884569,
+ "maximumAdjacentDeltaE": 15.678994601398896,
+ "maximumHueDrift": 9.765100610714853,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#101314",
+ "policy": "exact",
+ "generatedColor": "#101314",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#24292d",
+ "policy": "exact",
+ "generatedColor": "#24292d",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 40,
+ "color": "#495056",
+ "policy": "exact",
+ "generatedColor": "#495056",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#96a0ab",
+ "policy": "exact",
+ "generatedColor": "#96a0ab",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#e8f1f6",
+ "policy": "exact",
+ "generatedColor": "#e8f1f6",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "red": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.148740333207091,
+ "maximumAdjacentDeltaE": 18.502878710853896,
+ "maximumHueDrift": 20.083310251370563,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#4a2520",
+ "policy": "exact",
+ "generatedColor": "#4a2520",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5e3a35",
+ "policy": "exact",
+ "generatedColor": "#5e3a35",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#a48581",
+ "policy": "exact",
+ "generatedColor": "#a48581",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c6a6a2",
+ "policy": "exact",
+ "generatedColor": "#c6a6a2",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "orange": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.922903487932138,
+ "maximumAdjacentDeltaE": 19.94127134740763,
+ "maximumHueDrift": 20.4086975700435,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6e3812",
+ "policy": "exact",
+ "generatedColor": "#6e3812",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8a4818",
+ "policy": "exact",
+ "generatedColor": "#8a4818",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6987d",
+ "policy": "exact",
+ "generatedColor": "#b6987d",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3b89a",
+ "policy": "exact",
+ "generatedColor": "#d3b89a",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "yellow": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.5081047983077807,
+ "maximumAdjacentDeltaE": 20.504200087050446,
+ "maximumHueDrift": 12.895790962962792,
+ "hueIdentityRisk": "yellow-to-brown",
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6c5010",
+ "policy": "exact",
+ "generatedColor": "#6c5010",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#876515",
+ "policy": "exact",
+ "generatedColor": "#876515",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6a775",
+ "policy": "exact",
+ "generatedColor": "#b6a775",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#e6b85e",
+ "policy": "exact",
+ "generatedColor": "#e6b85e",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#dec074",
+ "policy": "exact",
+ "generatedColor": "#dec074",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3c490",
+ "policy": "exact",
+ "generatedColor": "#d3c490",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "green": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.5741076096527915,
+ "maximumAdjacentDeltaE": 18.50838760393274,
+ "maximumHueDrift": 10.05681926333392,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#244023",
+ "policy": "exact",
+ "generatedColor": "#244023",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#3a5e2c",
+ "policy": "exact",
+ "generatedColor": "#3a5e2c",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#96a880",
+ "policy": "exact",
+ "generatedColor": "#96a880",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a3c987",
+ "policy": "exact",
+ "generatedColor": "#a3c987",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b3c79a",
+ "policy": "exact",
+ "generatedColor": "#b3c79a",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "teal": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.3126821167385545,
+ "maximumAdjacentDeltaE": 19.063456989405676,
+ "maximumHueDrift": 9.521102889859662,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#174a40",
+ "policy": "exact",
+ "generatedColor": "#174a40",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#1f5e52",
+ "policy": "exact",
+ "generatedColor": "#1f5e52",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a499",
+ "policy": "exact",
+ "generatedColor": "#86a499",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#7cc5b3",
+ "policy": "exact",
+ "generatedColor": "#7cc5b3",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2b6",
+ "policy": "exact",
+ "generatedColor": "#a3c2b6",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "cyan": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.799011263317739,
+ "maximumAdjacentDeltaE": 19.1695395138387,
+ "maximumHueDrift": 8.959249565717528,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 10,
+ 15,
+ 20,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#204858",
+ "policy": "exact",
+ "generatedColor": "#204858",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a5e75",
+ "policy": "exact",
+ "generatedColor": "#2a5e75",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a4b1",
+ "policy": "exact",
+ "generatedColor": "#86a4b1",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2cf",
+ "policy": "exact",
+ "generatedColor": "#a3c2cf",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "blue": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.9652679454975286,
+ "maximumAdjacentDeltaE": 18.34406498826552,
+ "maximumHueDrift": 10.923072968808924,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2c54",
+ "policy": "exact",
+ "generatedColor": "#1f2c54",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a3b6e",
+ "policy": "exact",
+ "generatedColor": "#2a3b6e",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#8696b8",
+ "policy": "exact",
+ "generatedColor": "#8696b8",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#8aa1d8",
+ "policy": "exact",
+ "generatedColor": "#8aa1d8",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3b5d6",
+ "policy": "exact",
+ "generatedColor": "#a3b5d6",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "purple": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.872397474460235,
+ "maximumAdjacentDeltaE": 18.721155999206022,
+ "maximumHueDrift": 5.97019344891919,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#481b58",
+ "policy": "exact",
+ "generatedColor": "#481b58",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5a2370",
+ "policy": "exact",
+ "generatedColor": "#5a2370",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#947da6",
+ "policy": "exact",
+ "generatedColor": "#947da6",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b29bc4",
+ "policy": "exact",
+ "generatedColor": "#b29bc4",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c39adb",
+ "policy": "exact",
+ "generatedColor": "#c39adb",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "pink": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.059043304516781,
+ "maximumAdjacentDeltaE": 19.86425441990283,
+ "maximumHueDrift": 13.840358748620702,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#71223c",
+ "policy": "exact",
+ "generatedColor": "#71223c",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8d2d4c",
+ "policy": "exact",
+ "generatedColor": "#8d2d4c",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#aa7d8e",
+ "policy": "exact",
+ "generatedColor": "#aa7d8e",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#d97580",
+ "policy": "exact",
+ "generatedColor": "#d97580",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c89aab",
+ "policy": "exact",
+ "generatedColor": "#c89aab",
+ "deltaE": 0
+ }
+ ]
+ }
+ }
+ },
+ "coordination": [
+ {
+ "mode": "dark",
+ "stop": 50,
+ "closestFamilies": [
+ "Verdigris",
+ "Cathedral Mist"
+ ],
+ "minimumFamilyDeltaE": 4.606597753525486,
+ "strongestFamily": "Cathedral Plum",
+ "weakestFamily": "Blood Crimson",
+ "chromaRatio": 1.9600403281921102
+ }
+ ]
+ }
+}
diff --git a/packages/cli/assets/templates/themes/gothic/gothicPalettes.generated.ts b/packages/cli/assets/templates/themes/gothic/gothicPalettes.generated.ts
new file mode 100644
index 0000000000..60cd161cfa
--- /dev/null
+++ b/packages/cli/assets/templates/themes/gothic/gothicPalettes.generated.ts
@@ -0,0 +1,271 @@
+// 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": "Gothic Neutral",
+ "dark": {
+ "0": "#000000",
+ "5": "#0b0d0d",
+ "10": "#101314",
+ "15": "#191d20",
+ "20": "#24292d",
+ "25": "#2d3338",
+ "30": "#363c42",
+ "35": "#3e454b",
+ "40": "#495056",
+ "45": "#545b62",
+ "50": "#5e676e",
+ "55": "#687279",
+ "60": "#737d86",
+ "65": "#7e8791",
+ "70": "#8a939e",
+ "75": "#96a0ab",
+ "80": "#a7b1bb",
+ "85": "#bec8cf",
+ "90": "#d5dfe5",
+ "95": "#e8f1f6",
+ "100": "#ffffff"
+ }
+ },
+ "red": {
+ "name": "Blood Crimson",
+ "dark": {
+ "0": "#000000",
+ "5": "#220806",
+ "10": "#30110d",
+ "15": "#3c1c17",
+ "20": "#4a2520",
+ "25": "#54302a",
+ "30": "#5e3a35",
+ "35": "#6b4540",
+ "40": "#77514c",
+ "45": "#825e59",
+ "50": "#8d6a66",
+ "55": "#987774",
+ "60": "#a48581",
+ "65": "#b0908c",
+ "70": "#bb9996",
+ "75": "#c6a6a2",
+ "80": "#d5b5b1",
+ "85": "#e8c4c0",
+ "90": "#f2d8d5",
+ "95": "#fbece9",
+ "100": "#ffffff"
+ }
+ },
+ "orange": {
+ "name": "Rust Copper",
+ "dark": {
+ "0": "#000000",
+ "5": "#270a01",
+ "10": "#411904",
+ "15": "#5a2a0a",
+ "20": "#6e3812",
+ "25": "#7d4015",
+ "30": "#8a4818",
+ "35": "#955425",
+ "40": "#9e6136",
+ "45": "#a36f49",
+ "50": "#a77c5a",
+ "55": "#ae896d",
+ "60": "#b6987d",
+ "65": "#c0a387",
+ "70": "#caac8e",
+ "75": "#d3b89a",
+ "80": "#e0c5a9",
+ "85": "#edd2b5",
+ "90": "#fbdfc1",
+ "95": "#feefde",
+ "100": "#ffffff"
+ }
+ },
+ "yellow": {
+ "name": "Aged Gold",
+ "dark": {
+ "0": "#000000",
+ "5": "#211301",
+ "10": "#3b2904",
+ "15": "#573f0b",
+ "20": "#6c5010",
+ "25": "#795b12",
+ "30": "#876515",
+ "35": "#93701b",
+ "40": "#9b7b28",
+ "45": "#a1853e",
+ "50": "#a68f52",
+ "55": "#ad9a64",
+ "60": "#b6a775",
+ "65": "#e6b85e",
+ "70": "#dec074",
+ "75": "#d3c490",
+ "80": "#dfd1a0",
+ "85": "#e9dcae",
+ "90": "#f3e7bc",
+ "95": "#fcf2cf",
+ "100": "#ffffff"
+ }
+ },
+ "green": {
+ "name": "Forest Moss",
+ "dark": {
+ "0": "#000000",
+ "5": "#071607",
+ "10": "#10250f",
+ "15": "#1a3419",
+ "20": "#244023",
+ "25": "#2e4f27",
+ "30": "#3a5e2c",
+ "35": "#476a37",
+ "40": "#567644",
+ "45": "#668254",
+ "50": "#768f63",
+ "55": "#869b72",
+ "60": "#96a880",
+ "65": "#9cb983",
+ "70": "#a3c987",
+ "75": "#b3c79a",
+ "80": "#c2d2ac",
+ "85": "#cfdebd",
+ "90": "#deeacf",
+ "95": "#ecf6e1",
+ "100": "#ffffff"
+ }
+ },
+ "teal": {
+ "name": "Verdigris",
+ "dark": {
+ "0": "#000000",
+ "5": "#011813",
+ "10": "#072922",
+ "15": "#103b33",
+ "20": "#174a40",
+ "25": "#1b5449",
+ "30": "#1f5e52",
+ "35": "#2a6b5c",
+ "40": "#3c7768",
+ "45": "#528175",
+ "50": "#648d80",
+ "55": "#76988d",
+ "60": "#86a499",
+ "65": "#82b5a6",
+ "70": "#7cc5b3",
+ "75": "#a3c2b6",
+ "80": "#b4cec5",
+ "85": "#c4dcd2",
+ "90": "#d2e9e0",
+ "95": "#e1f7ee",
+ "100": "#ffffff"
+ }
+ },
+ "cyan": {
+ "name": "Cathedral Mist",
+ "dark": {
+ "0": "#000000",
+ "5": "#021620",
+ "10": "#0b2834",
+ "15": "#183a47",
+ "20": "#204858",
+ "25": "#245367",
+ "30": "#2a5e75",
+ "35": "#366a82",
+ "40": "#45768c",
+ "45": "#568094",
+ "50": "#668c9d",
+ "55": "#7798a7",
+ "60": "#86a4b1",
+ "65": "#90afbc",
+ "70": "#98b8c5",
+ "75": "#a3c2cf",
+ "80": "#b1d0dc",
+ "85": "#beddea",
+ "90": "#caeaf7",
+ "95": "#e0f5fe",
+ "100": "#ffffff"
+ }
+ },
+ "blue": {
+ "name": "Midnight Indigo",
+ "dark": {
+ "0": "#000000",
+ "5": "#080f26",
+ "10": "#0f1937",
+ "15": "#162145",
+ "20": "#1f2c54",
+ "25": "#243462",
+ "30": "#2a3b6e",
+ "35": "#35487c",
+ "40": "#445789",
+ "45": "#556795",
+ "50": "#6677a0",
+ "55": "#7787ac",
+ "60": "#8696b8",
+ "65": "#8aa1d8",
+ "70": "#96acd7",
+ "75": "#a3b5d6",
+ "80": "#b2c3e3",
+ "85": "#c3d2ee",
+ "90": "#d6e1f6",
+ "95": "#eaf0fc",
+ "100": "#ffffff"
+ }
+ },
+ "purple": {
+ "name": "Cathedral Plum",
+ "dark": {
+ "0": "#000000",
+ "5": "#1a0822",
+ "10": "#2b0d35",
+ "15": "#391347",
+ "20": "#481b58",
+ "25": "#511f64",
+ "30": "#5a2370",
+ "35": "#65307c",
+ "40": "#6f3f86",
+ "45": "#784f8d",
+ "50": "#815f94",
+ "55": "#896f9b",
+ "60": "#947da6",
+ "65": "#9f87b0",
+ "70": "#a790ba",
+ "75": "#b29bc4",
+ "80": "#c39adb",
+ "85": "#d2ade9",
+ "90": "#e5c9f7",
+ "95": "#f4e7fc",
+ "100": "#ffffff"
+ }
+ },
+ "pink": {
+ "name": "Rose Madder",
+ "dark": {
+ "0": "#000000",
+ "5": "#280510",
+ "10": "#430d20",
+ "15": "#5c182f",
+ "20": "#71223c",
+ "25": "#7f2844",
+ "30": "#8d2d4c",
+ "35": "#983958",
+ "40": "#9d4863",
+ "45": "#9f556d",
+ "50": "#a16276",
+ "55": "#a37082",
+ "60": "#aa7d8e",
+ "65": "#d97580",
+ "70": "#d28897",
+ "75": "#c89aab",
+ "80": "#d7aaba",
+ "85": "#e8bbcc",
+ "90": "#f4d2de",
+ "95": "#fce9f0",
+ "100": "#ffffff"
+ }
+ }
+} as const;
+
+export default palette;
diff --git a/packages/cli/assets/templates/themes/gothic/gothicTheme.ts b/packages/cli/assets/templates/themes/gothic/gothicTheme.ts
index 345092f345..96c0719972 100644
--- a/packages/cli/assets/templates/themes/gothic/gothicTheme.ts
+++ b/packages/cli/assets/templates/themes/gothic/gothicTheme.ts
@@ -6,7 +6,6 @@
* A dark-only theme with deep blue-gray tones and a distressed display
* heading. Inspired by ink, manuscript, and noir typography.
*
- * Core palette: #E8F1F6, #96A0AB, #495056, #24292D, #101314
* Categorical colors follow a pastel-on-dark pattern (light backgrounds
* with dark text) — same in any system color preference.
*
@@ -15,6 +14,12 @@
import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
import {gothicIconRegistry} from './icons';
+import {gothicPaletteRefs} from './gothicPaletteRefs.generated';
+
+const {blue, cyan, green, neutral, orange, pink, purple, red, teal, yellow} =
+ gothicPaletteRefs;
+
+const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;
/**
* Gothic syntax palette — atmospheric tones drawn from the gothic
@@ -26,29 +31,24 @@ import {gothicIconRegistry} from './icons';
const gothicSyntax = defineSyntaxTheme({
name: 'astryx-gothic',
tokens: {
- keyword: '#c39adb', // Cathedral plum
- string: '#a3c987', // Forest moss
- comment: '#6b7079', // Faded ink
- number: '#dec074', // Aged gold
- function: '#8aa1d8', // Midnight indigo
- type: '#c39adb', // Cathedral plum
- variable: '#E8F1F6', // Parchment
- operator: '#96A0AB', // Mid neutral
- constant: '#e6b85e', // Candlelight amber
- tag: '#d97580', // Blood crimson
- attribute: '#dec074', // Aged gold
- property: '#7cc5b3', // Verdigris
- punctuation: '#7a8290', // Mid neutral
- background: '#101314',
- // Diff rows on the near-black background: any lighter wash lowers every
- // light token's contrast, so the rows take opaque hues at the
- // background's own luminance — a deep green and a deep red that read as
- // colour, not brightness — and every token keeps the contrast it has on
- // the plain background. Markers: forest moss and blood crimson.
- added: '#081408',
- removed: '#1e0a0a',
- 'added-marker': '#a3c987',
- 'removed-marker': '#d97580',
+ keyword: purple.dark[80],
+ string: green.dark[70],
+ comment: neutral.dark[65],
+ number: yellow.dark[70],
+ function: blue.dark[65],
+ type: purple.dark[80],
+ variable: neutral.dark[95],
+ operator: neutral.dark[75],
+ constant: yellow.dark[65],
+ tag: pink.dark[65],
+ attribute: yellow.dark[70],
+ property: teal.dark[70],
+ punctuation: neutral.dark[65],
+ background: neutral.dark[10],
+ added: green.dark[5],
+ removed: red.dark[5],
+ 'added-marker': green.dark[70],
+ 'removed-marker': pink.dark[65],
},
});
@@ -114,129 +114,99 @@ export const gothicTheme = defineTheme({
syntax: gothicSyntax,
tokens: {
- // =========================================================================
- // Colors — gothic dark palette (single values, dark-only)
- // Core: #E8F1F6, #96A0AB, #495056, #24292D, #101314
- // =========================================================================
-
- // Core semantic
- '--color-accent': '#E8F1F6',
- '--color-accent-muted': '#E8F1F620',
- '--color-neutral': '#E8F1F61A',
- '--color-background-surface': '#101314',
- '--color-background-body': '#101314',
- '--color-overlay': '#101314CC',
- '--color-overlay-hover': '#E8F1F60D',
- '--color-overlay-pressed': '#E8F1F61A',
- '--color-background-muted': '#24292D',
-
- // Text
- '--color-text-primary': '#E8F1F6',
- '--color-text-secondary': '#96A0AB',
- '--color-text-disabled': '#495056',
- '--color-text-accent': '#E8F1F6',
- '--color-on-dark': '#E8F1F6',
- '--color-on-light': '#101314',
- '--color-on-accent': '#101314',
- '--color-on-success': '#101314',
- '--color-on-error': '#101314',
- '--color-on-warning': '#101314',
-
- // Icon
- '--color-icon-accent': '#E8F1F6',
- '--color-icon-primary': '#E8F1F6',
- '--color-icon-secondary': '#96A0AB',
- '--color-icon-disabled': '#495056',
-
- // Surface variants
- '--color-background-card': '#1a1d20',
- '--color-background-popover': '#24292D',
- '--color-background-inverted': '#E8F1F6',
-
- // Status / Sentiment — dusty pastels matching the categorical
- // pattern. Used for status surfaces, destructive button bg, etc.
- '--color-success': '#b3c79a', // sage moss
- '--color-success-muted': '#b3c79a',
- '--color-error': '#c6a6a2', // dusty rose
- '--color-error-muted': '#c6a6a2',
- '--color-warning': '#d3c490', // aged gold
- '--color-warning-muted': '#d3c490',
-
- // Border
- '--color-border': '#E8F1F61A',
- '--color-border-emphasized': '#495056',
-
- // Effects
- '--color-skeleton': '#495056',
- '--color-shadow': '#0000004D',
- '--color-tint-hover': 'white',
-
- // =========================================================================
- // Categorical — dusty pastel-on-dark pattern
- // Hand-tuned dusty pastels (T75 with reduced chroma) — confident
- // but never bright. Neutral is a dark slate with white text — the
- // "no-color" variant earns its hierarchy by matching the page mood.
- // =========================================================================
-
- // Blue (periwinkle midnight)
- '--color-background-blue': '#a3b5d6',
- '--color-border-blue': '#8696b8',
- '--color-icon-blue': '#2a3b6e',
- '--color-text-blue': '#1f2c54',
-
- // Cyan (cathedral mist)
- '--color-background-cyan': '#a3c2cf',
- '--color-border-cyan': '#86a4b1',
- '--color-icon-cyan': '#2a5e75',
- '--color-text-cyan': '#204858',
-
- // Gray (dark slate — special: dark bg + light text)
- '--color-background-gray': '#3d4248',
- '--color-border-gray': '#5d646b',
- '--color-icon-gray': '#E8F1F6',
- '--color-text-gray': '#E8F1F6',
-
- // Green (sage moss)
- '--color-background-green': '#b3c79a',
- '--color-border-green': '#96a880',
- '--color-icon-green': '#3a5e2c',
- '--color-text-green': '#244023',
-
- // Orange (warm tan)
- '--color-background-orange': '#d3b89a',
- '--color-border-orange': '#b6987d',
- '--color-icon-orange': '#8a4818',
- '--color-text-orange': '#6e3812',
-
- // Pink (dusty rose)
- '--color-background-pink': '#c89aab',
- '--color-border-pink': '#aa7d8e',
- '--color-icon-pink': '#8d2d4c',
- '--color-text-pink': '#71223c',
-
- // Purple (muted plum)
- '--color-background-purple': '#b29bc4',
- '--color-border-purple': '#947da6',
- '--color-icon-purple': '#5a2370',
- '--color-text-purple': '#481b58',
-
- // Red (dusty rose)
- '--color-background-red': '#c6a6a2',
- '--color-border-red': '#a48581',
- '--color-icon-red': '#5e3a35',
- '--color-text-red': '#4a2520',
-
- // Teal (sage verdigris)
- '--color-background-teal': '#a3c2b6',
- '--color-border-teal': '#86a499',
- '--color-icon-teal': '#1f5e52',
- '--color-text-teal': '#174a40',
-
- // Yellow (aged gold)
- '--color-background-yellow': '#d3c490',
- '--color-border-yellow': '#b6a775',
- '--color-icon-yellow': '#876515',
- '--color-text-yellow': '#6c5010',
+ '--color-accent': neutral.dark[95],
+ '--color-accent-muted': withAlpha(neutral.dark[95], '20'),
+ '--color-neutral': withAlpha(neutral.dark[95], '1a'),
+ '--color-background-surface': neutral.dark[10],
+ '--color-background-body': neutral.dark[10],
+ '--color-overlay': withAlpha(neutral.dark[10], 'cc'),
+ '--color-overlay-hover': withAlpha(neutral.dark[95], '0d'),
+ '--color-overlay-pressed': withAlpha(neutral.dark[95], '1a'),
+ '--color-background-muted': neutral.dark[20],
+
+ '--color-text-primary': neutral.dark[95],
+ '--color-text-secondary': neutral.dark[75],
+ '--color-text-disabled': neutral.dark[40],
+ '--color-text-accent': neutral.dark[95],
+ '--color-on-dark': neutral.dark[95],
+ '--color-on-light': neutral.dark[10],
+ '--color-on-accent': neutral.dark[10],
+ '--color-on-success': neutral.dark[10],
+ '--color-on-error': neutral.dark[10],
+ '--color-on-warning': neutral.dark[10],
+
+ '--color-icon-accent': neutral.dark[95],
+ '--color-icon-primary': neutral.dark[95],
+ '--color-icon-secondary': neutral.dark[75],
+ '--color-icon-disabled': neutral.dark[40],
+
+ '--color-background-card': neutral.dark[15],
+ '--color-background-popover': neutral.dark[20],
+ '--color-background-inverted': neutral.dark[95],
+
+ '--color-success': green.dark[75],
+ '--color-success-muted': green.dark[75],
+ '--color-error': red.dark[75],
+ '--color-error-muted': red.dark[75],
+ '--color-warning': yellow.dark[75],
+ '--color-warning-muted': yellow.dark[75],
+
+ '--color-border': withAlpha(neutral.dark[95], '1a'),
+ '--color-border-emphasized': neutral.dark[40],
+
+ '--color-skeleton': neutral.dark[40],
+ '--color-shadow': withAlpha(neutral.dark[0], '4d'),
+ '--color-tint-hover': neutral.dark[100],
+
+ '--color-background-blue': blue.dark[75],
+ '--color-border-blue': blue.dark[60],
+ '--color-icon-blue': blue.dark[30],
+ '--color-text-blue': blue.dark[20],
+
+ '--color-background-cyan': cyan.dark[75],
+ '--color-border-cyan': cyan.dark[60],
+ '--color-icon-cyan': cyan.dark[30],
+ '--color-text-cyan': cyan.dark[20],
+
+ '--color-background-gray': neutral.dark[35],
+ '--color-border-gray': neutral.dark[50],
+ '--color-icon-gray': neutral.dark[95],
+ '--color-text-gray': neutral.dark[95],
+
+ '--color-background-green': green.dark[75],
+ '--color-border-green': green.dark[60],
+ '--color-icon-green': green.dark[30],
+ '--color-text-green': green.dark[20],
+
+ '--color-background-orange': orange.dark[75],
+ '--color-border-orange': orange.dark[60],
+ '--color-icon-orange': orange.dark[30],
+ '--color-text-orange': orange.dark[20],
+
+ '--color-background-pink': pink.dark[75],
+ '--color-border-pink': pink.dark[60],
+ '--color-icon-pink': pink.dark[30],
+ '--color-text-pink': pink.dark[15],
+
+ '--color-background-purple': purple.dark[75],
+ '--color-border-purple': purple.dark[60],
+ '--color-icon-purple': purple.dark[30],
+ '--color-text-purple': purple.dark[20],
+
+ '--color-background-red': red.dark[75],
+ '--color-border-red': red.dark[60],
+ '--color-icon-red': red.dark[30],
+ '--color-text-red': red.dark[20],
+
+ '--color-background-teal': teal.dark[75],
+ '--color-border-teal': teal.dark[60],
+ '--color-icon-teal': teal.dark[30],
+ '--color-text-teal': teal.dark[20],
+
+ '--color-background-yellow': yellow.dark[75],
+ '--color-border-yellow': yellow.dark[60],
+ '--color-icon-yellow': yellow.dark[30],
+ '--color-text-yellow': yellow.dark[15],
// =========================================================================
// Radius — subtle rounding (original gothic)
@@ -254,14 +224,14 @@ export const gothicTheme = defineTheme({
// =========================================================================
// Shadows — restrained, atmospheric
// =========================================================================
- '--shadow-low': '0 2px 4px #00000033, 0 4px 8px #00000040',
- '--shadow-med': '0 2px 4px #00000033, 0 4px 12px #00000040',
- '--shadow-high': '0 4px 6px #00000040, 0 12px 24px #0000004D',
- '--shadow-inset-hover': 'inset 0px 0px 0px 1px #96A0AB30',
- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #96A0AB50',
- '--shadow-inset-success': 'inset 0px 0px 0px 1px #87b06a50',
- '--shadow-inset-warning': 'inset 0px 0px 0px 1px #d6b56a50',
- '--shadow-inset-error': 'inset 0px 0px 0px 1px #d4485150',
+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.dark[0], '33')}, 0 4px 8px ${withAlpha(neutral.dark[0], '40')}`,
+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.dark[0], '33')}, 0 4px 12px ${withAlpha(neutral.dark[0], '40')}`,
+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.dark[0], '40')}, 0 12px 24px ${withAlpha(neutral.dark[0], '4d')}`,
+ '--shadow-inset-hover': `inset 0 0 0 1px ${withAlpha(neutral.dark[75], '30')}`,
+ '--shadow-inset-selected': `inset 0 0 0 2px ${withAlpha(neutral.dark[75], '50')}`,
+ '--shadow-inset-success': `inset 0 0 0 1px ${withAlpha(green.dark[55], '50')}`,
+ '--shadow-inset-warning': `inset 0 0 0 1px ${withAlpha(yellow.dark[75], '50')}`,
+ '--shadow-inset-error': `inset 0 0 0 1px ${withAlpha(red.dark[75], '50')}`,
},
components: {
@@ -424,11 +394,11 @@ export const gothicTheme = defineTheme({
});
/**
- * Raw tonal palettes — every color at every tone step (0–100 in 5s).
- * Use these for custom components or data visualization.
- *
- * Categorical hues (blue, green, etc.) follow gothic gem-tone hues.
- * Neutral mirrors the original gothic blue-gray palette (H≈210).
+ * Frozen released compatibility palettes. These values preserve the public
+ * `gothicPalettes` shape and values for existing consumers; the maintained
+ * theme renders selected stops from `gothicPalettes.generated.ts` instead.
+ * Components should consume semantic theme tokens, and charts should use the
+ * data-visualization color API.
*/
export const gothicPalettes = {
// Neutral — H=210 C=4 (cool blue-gray, original gothic)
diff --git a/packages/cli/assets/templates/themes/gothic/palette.config.json b/packages/cli/assets/templates/themes/gothic/palette.config.json
new file mode 100644
index 0000000000..67a3e3a30c
--- /dev/null
+++ b/packages/cli/assets/templates/themes/gothic/palette.config.json
@@ -0,0 +1,371 @@
+{
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 36,
+ "neutralProfile": "custom",
+ "modeStrategy": "dark-only",
+ "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": "Gothic Neutral",
+ "seed": "#5d646b",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#101314",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#24292d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 40,
+ "color": "#495056",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#96a0ab",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#e8f1f6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Blood Crimson",
+ "seed": "#7d5e51",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#4a2520",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5e3a35",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#a48581",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c6a6a2",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "orange",
+ "name": "Rust Copper",
+ "seed": "#c87a4a",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6e3812",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8a4818",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6987d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3b89a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "yellow",
+ "name": "Aged Gold",
+ "seed": "#cca74c",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6c5010",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#876515",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6a775",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#e6b85e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#dec074",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3c490",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "green",
+ "name": "Forest Moss",
+ "seed": "#779e5d",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#244023",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#3a5e2c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#96a880",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a3c987",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b3c79a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Verdigris",
+ "seed": "#5aa091",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#174a40",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#1f5e52",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a499",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#7cc5b3",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2b6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "cyan",
+ "name": "Cathedral Mist",
+ "seed": "#6a9eb1",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#204858",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a5e75",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a4b1",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2cf",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "blue",
+ "name": "Midnight Indigo",
+ "seed": "#6170bf",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2c54",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a3b6e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#8696b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#8aa1d8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3b5d6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "purple",
+ "name": "Cathedral Plum",
+ "seed": "#a363bd",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#481b58",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5a2370",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#947da6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b29bc4",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c39adb",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "pink",
+ "name": "Rose Madder",
+ "seed": "#b15876",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#71223c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8d2d4c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#aa7d8e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#d97580",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c89aab",
+ "policy": "exact"
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/themes/gothic/README.md b/packages/themes/gothic/README.md
index 681c9e81a1..f84bda767d 100644
--- a/packages/themes/gothic/README.md
+++ b/packages/themes/gothic/README.md
@@ -29,11 +29,11 @@ function App() {
### Import paths
-| Path | Use case |
-| ----------------------------- | ------------------------------------------------------ |
-| `@astryxdesign/theme-gothic` | Source build (StyleX compilation via `@astryxdesign/build`) |
-| `@astryxdesign/theme-gothic/built` | Pre-built dist (Tailwind, plain CSS, or no build step) |
-| `@astryxdesign/theme-gothic/theme.css` | Pre-built CSS file (import in your stylesheet) |
+| Path | Use case |
+| -------------------------------------- | ----------------------------------------------------------- |
+| `@astryxdesign/theme-gothic` | Source build (StyleX compilation via `@astryxdesign/build`) |
+| `@astryxdesign/theme-gothic/built` | Pre-built dist (Tailwind, plain CSS, or no build step) |
+| `@astryxdesign/theme-gothic/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`.
@@ -51,25 +51,25 @@ Gothic is dark-only by design: every token is a single value, and the
output CSS contains no `light-dark()`, so the theme renders identically
whether the user prefers light or dark.
-| Aspect | Choice |
-| ------------ | ------------------------------------------------------ |
-| Mode | Dark only, no light variant |
-| Neutral | Cool blue-gray (#101314 → #E8F1F6) |
-| Status | Forest moss, blood crimson, candlelight amber |
-| Categorical | Pastel-on-dark: light backgrounds, dark text |
-| Radius | Subtle rounding (2–24px) |
-| Motion | Slower / theatrical (150ms → 800ms, 0.75 ratio) |
-| Type scale | 14px base, 1.2 ratio |
+| Aspect | Choice |
+| ----------- | ----------------------------------------------- |
+| Mode | Dark only, no light variant |
+| Neutral | Cool blue-gray (#101314 → #E8F1F6) |
+| Status | Forest moss, blood crimson, candlelight amber |
+| Categorical | Pastel-on-dark: light backgrounds, dark text |
+| Radius | Subtle rounding (2–24px) |
+| Motion | Slower / theatrical (150ms → 800ms, 0.75 ratio) |
+| Type scale | 14px base, 1.2 ratio |
## Fonts
This theme uses custom typefaces:
-| Role | Font | Vibe |
-| ------- | --------------------- | -------------------------- |
-| Body | Fustat | Clean modern sans |
-| Heading | Manufacturing Consent | Distressed display |
-| Code | JetBrains Mono | Crisp, monospaced |
+| Role | Font | Vibe |
+| ------- | --------------------- | ------------------ |
+| Body | Fustat | Clean modern sans |
+| Heading | Manufacturing Consent | Distressed display |
+| Code | JetBrains Mono | Crisp, monospaced |
**These fonts must be loaded separately.** The theme references them by name but does not bundle the font files.
@@ -85,20 +85,38 @@ Add this to your HTML `<head>`:
Without this, the theme falls back to system fonts (heading falls through Manufacturing Consent → UnifrakturMaguntia → Old English Text MT → serif).
-## Tonal palettes
+## Reviewed palette and compatibility ramp
-The theme exports raw tonal palettes for custom components or data
-visualization. Each palette has 21 tone steps (0–100 in 5s):
+Gothic keeps its generation request in `palette.config.json`, the reviewed
+`astryx-oklch-v1` output in `src/gothicPalettes.generated.ts`, and the detached
+generation receipt beside it. The maintained theme renders selected values from
+that private generated palette.
-```tsx
-import {gothicPalettes} from '@astryxdesign/theme-gothic';
+The public `gothicPalettes.family[stop]` export shown below is a frozen released
+compatibility ramp, not the palette the maintained theme renders. Its numeric
+stops and each family's `hue` and `chroma` metadata remain byte-identical in
+`gothicTheme.ts` so existing consumers do not need to migrate.
+
+The palette is dark-only. It preserves Gothic's pastel categorical colors and
+uses deliberate jewel-tone anchors for syntax highlighting. The complete
+generated palette is private authoring data; the runtime theme imports only the
+selected stops in `gothicPaletteRefs.generated.ts`.
-// e.g. cathedral plum at tone 50
-const plum = gothicPalettes.purple[50]; // '#a363bd'
+Use semantic theme tokens in components. Gothic's theme source maps the roles
+it owns to named palette stops; components never read raw palette values
+directly. The prebuilt theme and CSS contain resolved values. Changing the
+palette must include the regenerated receipt, selected-reference module, token
+diff, tests, and visual review. Keep `gothicTheme.ts` and the CLI template copy
+synchronized when changing a mapping.
+
+```ts
+import {gothicPalettes} from '@astryxdesign/theme-gothic';
-// or use the metadata for derived tools
-const {hue, chroma} = gothicPalettes.neutral; // {hue: 210, chroma: 4}
+const purple = gothicPalettes.purple[80];
+const neutral = gothicPalettes.neutral[10];
```
-Available palettes: `neutral`, `blue`, `cyan`, `green`, `orange`, `pink`,
-`purple`, `red`, `teal`, `yellow`.
+The palette is an authoring and audit reference, not a component styling API,
+chart-color API, or accessibility guarantee. Components should read semantic
+tokens, charts should use the data-visualization color API, and every custom
+foreground/background pair still needs contextual contrast verification.
diff --git a/packages/themes/gothic/gothic.spec.md b/packages/themes/gothic/gothic.spec.md
new file mode 100644
index 0000000000..f96896e97d
--- /dev/null
+++ b/packages/themes/gothic/gothic.spec.md
@@ -0,0 +1,179 @@
+---
+schema_version: 2
+template_version: 2
+kind: theme
+id: theme:gothic
+authority: current
+approved_by: rubyycheung
+approved_at: 2026-10-17
+review_triggers:
+ [tokens, palette-values, component-mappings, contrast, artifacts]
+verified_by:
+ [
+ packages/themes/gothic/src/gothicTheme.test.ts,
+ packages/themes/gothic/src/gothicColorMapping.test.ts,
+ scripts/generate-gothic-palette-refs.test.mjs,
+ ]
+package: '@astryxdesign/theme-gothic'
+source_theme: packages/themes/gothic/src/gothicTheme.ts
+references:
+ [
+ architecture:theme-authoring-contract,
+ architecture:theme-tokens,
+ architecture:theme-compilation,
+ ]
+---
+
+# Gothic theme specification
+
+## Intent and audience
+
+Gothic is a dark-only atmospheric theme with deep blue-gray surfaces, restrained
+pastel categorical panels, and jewel-tone syntax colors. It serves experiences
+that want manuscript and noir character without reducing semantic clarity.
+
+## Inheritance and base
+
+Gothic starts from Astryx core defaults and overrides selected typography,
+motion, radius, shadow, semantic color, syntax, icon, and component values. It
+renders one dark appearance regardless of system color preference and does not
+extend another published package theme.
+
+## Portable token overrides
+
+The exact maintained values live in `source_theme`. Gothic owns its dark surface
+ladder, content hierarchy, status and categorical selections, syntax colors,
+color-bearing shadows, and existing component mappings. Portable token
+vocabulary remains owned by `architecture:theme-tokens`.
+
+## Theme-local role definitions
+
+Gothic defines no public theme-local token names. Its package-specific decisions
+use existing portable tokens and component mapping slots.
+
+## Tonal palette definitions
+
+Gothic owns complete private dark ramps for neutral, blue, cyan, green, orange,
+pink, purple, red, teal, and yellow. The committed request, generated module,
+and receipt reproduce the accepted `astryx-oklch-v1` result. Deliberate anchors
+preserve Gothic's blue-gray neutral ladder, pastel categorical surfaces, and
+jewel-tone syntax identity.
+
+Palette generation is explicit maintenance work and never runs during a normal
+theme build. The request uses only fields implemented by the recipe.
+
+## Component and state mappings
+
+Gothic maps existing semantic, categorical, syntax, and color-bearing effect
+roles to named Gothic dark-palette stops. Secondary controls retain Gothic's
+established dark-slate treatment, and component states keep their existing
+meanings. Components consume semantic tokens rather than the complete palette.
+
+Gothic defines no additional component states or data-visualization colors.
+
+## Compatibility and migration
+
+The released `gothicPalettes` export remains a flat ramp for each family,
+including numeric stops and `hue` and `chroma` metadata. The complete generated
+dark palette remains private to authoring, mapping, tests, and review tooling.
+
+Consumers can extend `gothicTheme` and override color, syntax, shadow, and
+component values while preserving the released package contract.
+
+## Accessibility and contrast evidence
+
+Gothic-specific mapping and rendered-component evidence covers its only
+supported mode and maintained semantic and categorical states. A palette stop
+alone is not an accessibility claim; contextual component evidence remains
+authoritative. Yellow text uses `yellow.dark[15]` (`#573f0b`) on
+`yellow.dark[75]` (`#d3c490`) at 5.69:1, and pink text uses
+`pink.dark[15]` (`#5c182f`) on `pink.dark[75]` (`#c89aab`) at 5.33:1.
+Both pairings keep category and status content on named Gothic stops while
+clearing normal-text AA. Syntax comments use `neutral.dark[65]` (`#7e8791`) on
+`neutral.dark[10]` (`#101314`) at 5.12:1, so the maintained syntax mapping also
+clears normal-text AA without an off-palette value.
+
+## 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 |
+| ----------------------- | ---------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------- |
+| Dark palette identity | Config, generated module, receipt, reproduction test | every family and stop | Regeneration changes accepted values or stable provenance. |
+| Role mapping | Gothic mapping and theme tests | semantic, categorical, syntax, effects | A maintained role bypasses selected Gothic references. |
+| Public compatibility | Flat-ramp compatibility test and package build | numeric stops; `hue`; `chroma` | A released member or shape changes. |
+| Mode contract | Theme CSS and rendered evidence | dark only | Light-dependent output or divergent mode values appear. |
+| Package/template parity | Byte comparison and build | package and CLI template | Copies diverge. |
+
+## Decision log
+
+### DEC-1 — Gothic owns one reproducible dark-only palette
+
+**Reference:** `theme:gothic/DEC-1`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Gothic keeps its blue-gray canvas, pastel categorical panels, and jewel-tone
+syntax identity in complete private dark ramps. Request, generated result,
+receipt, and visual evidence change together.
+
+Rejected: inheriting another theme's palette, adding a light mode, or
+regenerating values during normal builds.
+
+### DEC-2 — Existing roles use selected Gothic palette references
+
+**Reference:** `theme:gothic/DEC-2`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Gothic's semantic, categorical, syntax, and color-bearing effect values use
+named Gothic 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-3 — The released flat palette stays compatible
+
+**Reference:** `theme:gothic/DEC-3`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+`gothicPalettes` keeps its released flat family shape, numeric stops, `hue`, and
+`chroma`. The generated dark palette remains private authoring data.
+
+Rejected: forcing existing consumers onto the generated palette shape.
+
+### DEC-4 — Runtime references are deterministic and minimal
+
+**Reference:** `theme:gothic/DEC-4`
+**Decider:** `rubyycheung`, `2026-10-17`
+
+Gothic's selected-reference module contains exactly the family, mode, and stop
+values referenced by the maintained theme. Write mode synchronizes package and
+CLI-template outputs; check mode compares the complete projection without
+writing.
+
+Rejected: bundling the complete private palette or maintaining a manual
+selection manifest.
+
+## Open questions
+
+- **OQ1 — Cross-theme contrast methodology** (`human-design`): Which current
+ design record owns the human visual and accessibility methodology used to
+ judge token and color pairings? No current design record owns this dependency;
+ Gothic owns only its theme-specific pairings, exceptions, and measured evidence.
+
+## Content boundary
+
+This record owns Gothic's intent, selected token and palette mappings, required
+states, theme-specific exceptions, measured receipts, known gaps,
+compatibility, artifacts, and evidence. Shared generation mechanics and token
+vocabulary belong to architecture and tooling. Component behavior belongs to
+component or family records. Consumer syntax belongs to consumer documentation.
diff --git a/packages/themes/gothic/package.json b/packages/themes/gothic/package.json
index 1c0a71dada..6eb7d3ff4f 100644
--- a/packages/themes/gothic/package.json
+++ b/packages/themes/gothic/package.json
@@ -51,10 +51,11 @@
"dist",
"src",
"fonts.css",
- "fonts.css.d.ts"
+ "fonts.css.d.ts",
+ "palette.config.json"
],
"scripts": {
- "build": "node ../../../scripts/clean-dist.mjs && astryx theme build src/gothicTheme.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-gothic-palette-refs.mjs --check && astryx theme build src/gothicTheme.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/gothic/palette.config.json b/packages/themes/gothic/palette.config.json
new file mode 100644
index 0000000000..67a3e3a30c
--- /dev/null
+++ b/packages/themes/gothic/palette.config.json
@@ -0,0 +1,371 @@
+{
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 36,
+ "neutralProfile": "custom",
+ "modeStrategy": "dark-only",
+ "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": "Gothic Neutral",
+ "seed": "#5d646b",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#101314",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#24292d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 40,
+ "color": "#495056",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#96a0ab",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#e8f1f6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Blood Crimson",
+ "seed": "#7d5e51",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#4a2520",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5e3a35",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#a48581",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c6a6a2",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "orange",
+ "name": "Rust Copper",
+ "seed": "#c87a4a",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6e3812",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8a4818",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6987d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3b89a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "yellow",
+ "name": "Aged Gold",
+ "seed": "#cca74c",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6c5010",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#876515",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6a775",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#e6b85e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#dec074",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3c490",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "green",
+ "name": "Forest Moss",
+ "seed": "#779e5d",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#244023",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#3a5e2c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#96a880",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a3c987",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b3c79a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Verdigris",
+ "seed": "#5aa091",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#174a40",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#1f5e52",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a499",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#7cc5b3",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2b6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "cyan",
+ "name": "Cathedral Mist",
+ "seed": "#6a9eb1",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#204858",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a5e75",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a4b1",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2cf",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "blue",
+ "name": "Midnight Indigo",
+ "seed": "#6170bf",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2c54",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a3b6e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#8696b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#8aa1d8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3b5d6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "purple",
+ "name": "Cathedral Plum",
+ "seed": "#a363bd",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#481b58",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5a2370",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#947da6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b29bc4",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c39adb",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "pink",
+ "name": "Rose Madder",
+ "seed": "#b15876",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#71223c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8d2d4c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#aa7d8e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#d97580",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c89aab",
+ "policy": "exact"
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/themes/gothic/src/gothicColorMapping.test.ts b/packages/themes/gothic/src/gothicColorMapping.test.ts
new file mode 100644
index 0000000000..f492dcf9d0
--- /dev/null
+++ b/packages/themes/gothic/src/gothicColorMapping.test.ts
@@ -0,0 +1,43 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+import {readFileSync} from 'node:fs';
+import {describe, expect, it} from 'vitest';
+import {gothicTheme} from './gothicTheme';
+
+const source = readFileSync(
+ new URL('./gothicTheme.ts', import.meta.url),
+ 'utf8',
+);
+
+const maintainedThemeSource = source.slice(
+ 0,
+ source.indexOf('/**\n * Frozen released compatibility palettes'),
+);
+
+describe('gothic color token mapping completeness', () => {
+ it('does not redefine the data-visualization color system', () => {
+ expect(
+ Object.keys(gothicTheme.tokens).filter(name =>
+ name.startsWith('--color-data-'),
+ ),
+ ).toEqual([]);
+ });
+
+ it('keeps every root color value concrete', () => {
+ for (const [name, value] of Object.entries(gothicTheme.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})?)$/i,
+ );
+ }
+ });
+
+ it('uses no one-off color literals in the maintained theme source', () => {
+ expect(maintainedThemeSource).not.toMatch(
+ /#[0-9a-f]{3,8}\b|\brgba?\(|\bhsl[a]?\(|\boklch\(|\bblack\b|\bwhite\b/i,
+ );
+ });
+});
diff --git a/packages/themes/gothic/src/gothicPaletteRefs.generated.ts b/packages/themes/gothic/src/gothicPaletteRefs.generated.ts
new file mode 100644
index 0000000000..f3d220184b
--- /dev/null
+++ b/packages/themes/gothic/src/gothicPaletteRefs.generated.ts
@@ -0,0 +1,41 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+// Generated from the committed full palette for the stops used by Gothic's
+// theme source. Regenerate with `pnpm generate:gothic-palette-refs`.
+// Keep the complete palette available for authoring and audits without
+// making consumers pay for unused palette stops.
+// prettier-ignore
+export const gothicPaletteRefs = {
+ purple: {
+ dark: {20: '#481b58', 30: '#5a2370', 60: '#947da6', 75: '#b29bc4', 80: '#c39adb'},
+ },
+ green: {
+ dark: {5: '#071607', 20: '#244023', 30: '#3a5e2c', 55: '#869b72', 60: '#96a880', 70: '#a3c987', 75: '#b3c79a'},
+ },
+ neutral: {
+ dark: {0: '#000000', 10: '#101314', 15: '#191d20', 20: '#24292d', 35: '#3e454b', 40: '#495056', 50: '#5e676e', 65: '#7e8791', 75: '#96a0ab', 95: '#e8f1f6', 100: '#ffffff'},
+ },
+ yellow: {
+ dark: {15: '#573f0b', 30: '#876515', 60: '#b6a775', 65: '#e6b85e', 70: '#dec074', 75: '#d3c490'},
+ },
+ blue: {
+ dark: {20: '#1f2c54', 30: '#2a3b6e', 60: '#8696b8', 65: '#8aa1d8', 75: '#a3b5d6'},
+ },
+ pink: {
+ dark: {15: '#5c182f', 30: '#8d2d4c', 60: '#aa7d8e', 65: '#d97580', 75: '#c89aab'},
+ },
+ teal: {
+ dark: {20: '#174a40', 30: '#1f5e52', 60: '#86a499', 70: '#7cc5b3', 75: '#a3c2b6'},
+ },
+ red: {
+ dark: {5: '#220806', 20: '#4a2520', 30: '#5e3a35', 60: '#a48581', 75: '#c6a6a2'},
+ },
+ cyan: {
+ dark: {20: '#204858', 30: '#2a5e75', 60: '#86a4b1', 75: '#a3c2cf'},
+ },
+ orange: {
+ dark: {20: '#6e3812', 30: '#8a4818', 60: '#b6987d', 75: '#d3b89a'},
+ },
+} as const;
+
+export default gothicPaletteRefs;
diff --git a/packages/themes/gothic/src/gothicPalettes.generated.receipt.json b/packages/themes/gothic/src/gothicPalettes.generated.receipt.json
new file mode 100644
index 0000000000..0722a31937
--- /dev/null
+++ b/packages/themes/gothic/src/gothicPalettes.generated.receipt.json
@@ -0,0 +1,979 @@
+{
+ "schemaVersion": 1,
+ "recipe": "astryx-oklch-v1",
+ "generatorVersion": "palette-generator-v1",
+ "candidateFormatVersion": "palette-typescript-v1",
+ "candidateSha256": "e4496b338ca52524b0150cb28893a4ccc9bfa376227454c77791755caaa242df",
+ "preview": {
+ "version": "palette-preview-v1",
+ "sha256": "51e36040e9e78a2c83b65e498bb99a6deb43842ed5c43c17740b2da36fa52d3b"
+ },
+ "request": {
+ "recipe": "astryx-oklch-v1",
+ "vibrancy": 36,
+ "neutralProfile": "custom",
+ "modeStrategy": "dark-only",
+ "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": "Gothic Neutral",
+ "seed": "#5d646b",
+ "kind": "neutral",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#101314",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#24292d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 40,
+ "color": "#495056",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#96a0ab",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#e8f1f6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "red",
+ "name": "Blood Crimson",
+ "seed": "#7d5e51",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#4a2520",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5e3a35",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#a48581",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c6a6a2",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "orange",
+ "name": "Rust Copper",
+ "seed": "#c87a4a",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6e3812",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8a4818",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6987d",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3b89a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "yellow",
+ "name": "Aged Gold",
+ "seed": "#cca74c",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6c5010",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#876515",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6a775",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#e6b85e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#dec074",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3c490",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "green",
+ "name": "Forest Moss",
+ "seed": "#779e5d",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#244023",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#3a5e2c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#96a880",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a3c987",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b3c79a",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "teal",
+ "name": "Verdigris",
+ "seed": "#5aa091",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#174a40",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#1f5e52",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a499",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#7cc5b3",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2b6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "cyan",
+ "name": "Cathedral Mist",
+ "seed": "#6a9eb1",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#204858",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a5e75",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a4b1",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2cf",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "blue",
+ "name": "Midnight Indigo",
+ "seed": "#6170bf",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2c54",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a3b6e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#8696b8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#8aa1d8",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3b5d6",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "purple",
+ "name": "Cathedral Plum",
+ "seed": "#a363bd",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#481b58",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5a2370",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#947da6",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b29bc4",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c39adb",
+ "policy": "exact"
+ }
+ ]
+ },
+ {
+ "id": "pink",
+ "name": "Rose Madder",
+ "seed": "#b15876",
+ "kind": "chromatic",
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#71223c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8d2d4c",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#aa7d8e",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#d97580",
+ "policy": "exact"
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c89aab",
+ "policy": "exact"
+ }
+ ]
+ }
+ ]
+ },
+ "diagnostics": {
+ "families": {
+ "neutral": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.724361507884569,
+ "maximumAdjacentDeltaE": 15.678994601398896,
+ "maximumHueDrift": 9.765100610714853,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 10,
+ "color": "#101314",
+ "policy": "exact",
+ "generatedColor": "#101314",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#24292d",
+ "policy": "exact",
+ "generatedColor": "#24292d",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 40,
+ "color": "#495056",
+ "policy": "exact",
+ "generatedColor": "#495056",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#96a0ab",
+ "policy": "exact",
+ "generatedColor": "#96a0ab",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 95,
+ "color": "#e8f1f6",
+ "policy": "exact",
+ "generatedColor": "#e8f1f6",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "red": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.148740333207091,
+ "maximumAdjacentDeltaE": 18.502878710853896,
+ "maximumHueDrift": 20.083310251370563,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#4a2520",
+ "policy": "exact",
+ "generatedColor": "#4a2520",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5e3a35",
+ "policy": "exact",
+ "generatedColor": "#5e3a35",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#a48581",
+ "policy": "exact",
+ "generatedColor": "#a48581",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c6a6a2",
+ "policy": "exact",
+ "generatedColor": "#c6a6a2",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "orange": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.922903487932138,
+ "maximumAdjacentDeltaE": 19.94127134740763,
+ "maximumHueDrift": 20.4086975700435,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6e3812",
+ "policy": "exact",
+ "generatedColor": "#6e3812",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8a4818",
+ "policy": "exact",
+ "generatedColor": "#8a4818",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6987d",
+ "policy": "exact",
+ "generatedColor": "#b6987d",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3b89a",
+ "policy": "exact",
+ "generatedColor": "#d3b89a",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "yellow": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.5081047983077807,
+ "maximumAdjacentDeltaE": 20.504200087050446,
+ "maximumHueDrift": 12.895790962962792,
+ "hueIdentityRisk": "yellow-to-brown",
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#6c5010",
+ "policy": "exact",
+ "generatedColor": "#6c5010",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#876515",
+ "policy": "exact",
+ "generatedColor": "#876515",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#b6a775",
+ "policy": "exact",
+ "generatedColor": "#b6a775",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#e6b85e",
+ "policy": "exact",
+ "generatedColor": "#e6b85e",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#dec074",
+ "policy": "exact",
+ "generatedColor": "#dec074",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#d3c490",
+ "policy": "exact",
+ "generatedColor": "#d3c490",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "green": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.5741076096527915,
+ "maximumAdjacentDeltaE": 18.50838760393274,
+ "maximumHueDrift": 10.05681926333392,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#244023",
+ "policy": "exact",
+ "generatedColor": "#244023",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#3a5e2c",
+ "policy": "exact",
+ "generatedColor": "#3a5e2c",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#96a880",
+ "policy": "exact",
+ "generatedColor": "#96a880",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#a3c987",
+ "policy": "exact",
+ "generatedColor": "#a3c987",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b3c79a",
+ "policy": "exact",
+ "generatedColor": "#b3c79a",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "teal": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.3126821167385545,
+ "maximumAdjacentDeltaE": 19.063456989405676,
+ "maximumHueDrift": 9.521102889859662,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#174a40",
+ "policy": "exact",
+ "generatedColor": "#174a40",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#1f5e52",
+ "policy": "exact",
+ "generatedColor": "#1f5e52",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a499",
+ "policy": "exact",
+ "generatedColor": "#86a499",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 70,
+ "color": "#7cc5b3",
+ "policy": "exact",
+ "generatedColor": "#7cc5b3",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2b6",
+ "policy": "exact",
+ "generatedColor": "#a3c2b6",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "cyan": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.799011263317739,
+ "maximumAdjacentDeltaE": 19.1695395138387,
+ "maximumHueDrift": 8.959249565717528,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 10,
+ 15,
+ 20,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#204858",
+ "policy": "exact",
+ "generatedColor": "#204858",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a5e75",
+ "policy": "exact",
+ "generatedColor": "#2a5e75",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#86a4b1",
+ "policy": "exact",
+ "generatedColor": "#86a4b1",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3c2cf",
+ "policy": "exact",
+ "generatedColor": "#a3c2cf",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "blue": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.9652679454975286,
+ "maximumAdjacentDeltaE": 18.34406498826552,
+ "maximumHueDrift": 10.923072968808924,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 85,
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#1f2c54",
+ "policy": "exact",
+ "generatedColor": "#1f2c54",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#2a3b6e",
+ "policy": "exact",
+ "generatedColor": "#2a3b6e",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#8696b8",
+ "policy": "exact",
+ "generatedColor": "#8696b8",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#8aa1d8",
+ "policy": "exact",
+ "generatedColor": "#8aa1d8",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#a3b5d6",
+ "policy": "exact",
+ "generatedColor": "#a3b5d6",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "purple": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 2.872397474460235,
+ "maximumAdjacentDeltaE": 18.721155999206022,
+ "maximumHueDrift": 5.97019344891919,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#481b58",
+ "policy": "exact",
+ "generatedColor": "#481b58",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#5a2370",
+ "policy": "exact",
+ "generatedColor": "#5a2370",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#947da6",
+ "policy": "exact",
+ "generatedColor": "#947da6",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#b29bc4",
+ "policy": "exact",
+ "generatedColor": "#b29bc4",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 80,
+ "color": "#c39adb",
+ "policy": "exact",
+ "generatedColor": "#c39adb",
+ "deltaE": 0
+ }
+ ]
+ }
+ },
+ "pink": {
+ "dark": {
+ "monotonic": true,
+ "minimumAdjacentDeltaE": 3.059043304516781,
+ "maximumAdjacentDeltaE": 19.86425441990283,
+ "maximumHueDrift": 13.840358748620702,
+ "hueIdentityRisk": null,
+ "gamutMappedStops": [
+ 90,
+ 95,
+ 100
+ ],
+ "anchors": [
+ {
+ "mode": "dark",
+ "stop": 20,
+ "color": "#71223c",
+ "policy": "exact",
+ "generatedColor": "#71223c",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 30,
+ "color": "#8d2d4c",
+ "policy": "exact",
+ "generatedColor": "#8d2d4c",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 60,
+ "color": "#aa7d8e",
+ "policy": "exact",
+ "generatedColor": "#aa7d8e",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 65,
+ "color": "#d97580",
+ "policy": "exact",
+ "generatedColor": "#d97580",
+ "deltaE": 0
+ },
+ {
+ "mode": "dark",
+ "stop": 75,
+ "color": "#c89aab",
+ "policy": "exact",
+ "generatedColor": "#c89aab",
+ "deltaE": 0
+ }
+ ]
+ }
+ }
+ },
+ "coordination": [
+ {
+ "mode": "dark",
+ "stop": 50,
+ "closestFamilies": [
+ "Verdigris",
+ "Cathedral Mist"
+ ],
+ "minimumFamilyDeltaE": 4.606597753525486,
+ "strongestFamily": "Cathedral Plum",
+ "weakestFamily": "Blood Crimson",
+ "chromaRatio": 1.9600403281921102
+ }
+ ]
+ }
+}
diff --git a/packages/themes/gothic/src/gothicPalettes.generated.ts b/packages/themes/gothic/src/gothicPalettes.generated.ts
new file mode 100644
index 0000000000..60cd161cfa
--- /dev/null
+++ b/packages/themes/gothic/src/gothicPalettes.generated.ts
@@ -0,0 +1,271 @@
+// 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": "Gothic Neutral",
+ "dark": {
+ "0": "#000000",
+ "5": "#0b0d0d",
+ "10": "#101314",
+ "15": "#191d20",
+ "20": "#24292d",
+ "25": "#2d3338",
+ "30": "#363c42",
+ "35": "#3e454b",
+ "40": "#495056",
+ "45": "#545b62",
+ "50": "#5e676e",
+ "55": "#687279",
+ "60": "#737d86",
+ "65": "#7e8791",
+ "70": "#8a939e",
+ "75": "#96a0ab",
+ "80": "#a7b1bb",
+ "85": "#bec8cf",
+ "90": "#d5dfe5",
+ "95": "#e8f1f6",
+ "100": "#ffffff"
+ }
+ },
+ "red": {
+ "name": "Blood Crimson",
+ "dark": {
+ "0": "#000000",
+ "5": "#220806",
+ "10": "#30110d",
+ "15": "#3c1c17",
+ "20": "#4a2520",
+ "25": "#54302a",
+ "30": "#5e3a35",
+ "35": "#6b4540",
+ "40": "#77514c",
+ "45": "#825e59",
+ "50": "#8d6a66",
+ "55": "#987774",
+ "60": "#a48581",
+ "65": "#b0908c",
+ "70": "#bb9996",
+ "75": "#c6a6a2",
+ "80": "#d5b5b1",
+ "85": "#e8c4c0",
+ "90": "#f2d8d5",
+ "95": "#fbece9",
+ "100": "#ffffff"
+ }
+ },
+ "orange": {
+ "name": "Rust Copper",
+ "dark": {
+ "0": "#000000",
+ "5": "#270a01",
+ "10": "#411904",
+ "15": "#5a2a0a",
+ "20": "#6e3812",
+ "25": "#7d4015",
+ "30": "#8a4818",
+ "35": "#955425",
+ "40": "#9e6136",
+ "45": "#a36f49",
+ "50": "#a77c5a",
+ "55": "#ae896d",
+ "60": "#b6987d",
+ "65": "#c0a387",
+ "70": "#caac8e",
+ "75": "#d3b89a",
+ "80": "#e0c5a9",
+ "85": "#edd2b5",
+ "90": "#fbdfc1",
+ "95": "#feefde",
+ "100": "#ffffff"
+ }
+ },
+ "yellow": {
+ "name": "Aged Gold",
+ "dark": {
+ "0": "#000000",
+ "5": "#211301",
+ "10": "#3b2904",
+ "15": "#573f0b",
+ "20": "#6c5010",
+ "25": "#795b12",
+ "30": "#876515",
+ "35": "#93701b",
+ "40": "#9b7b28",
+ "45": "#a1853e",
+ "50": "#a68f52",
+ "55": "#ad9a64",
+ "60": "#b6a775",
+ "65": "#e6b85e",
+ "70": "#dec074",
+ "75": "#d3c490",
+ "80": "#dfd1a0",
+ "85": "#e9dcae",
+ "90": "#f3e7bc",
+ "95": "#fcf2cf",
+ "100": "#ffffff"
+ }
+ },
+ "green": {
+ "name": "Forest Moss",
+ "dark": {
+ "0": "#000000",
+ "5": "#071607",
+ "10": "#10250f",
+ "15": "#1a3419",
+ "20": "#244023",
+ "25": "#2e4f27",
+ "30": "#3a5e2c",
+ "35": "#476a37",
+ "40": "#567644",
+ "45": "#668254",
+ "50": "#768f63",
+ "55": "#869b72",
+ "60": "#96a880",
+ "65": "#9cb983",
+ "70": "#a3c987",
+ "75": "#b3c79a",
+ "80": "#c2d2ac",
+ "85": "#cfdebd",
+ "90": "#deeacf",
+ "95": "#ecf6e1",
+ "100": "#ffffff"
+ }
+ },
+ "teal": {
+ "name": "Verdigris",
+ "dark": {
+ "0": "#000000",
+ "5": "#011813",
+ "10": "#072922",
+ "15": "#103b33",
+ "20": "#174a40",
+ "25": "#1b5449",
+ "30": "#1f5e52",
+ "35": "#2a6b5c",
+ "40": "#3c7768",
+ "45": "#528175",
+ "50": "#648d80",
+ "55": "#76988d",
+ "60": "#86a499",
+ "65": "#82b5a6",
+ "70": "#7cc5b3",
+ "75": "#a3c2b6",
+ "80": "#b4cec5",
+ "85": "#c4dcd2",
+ "90": "#d2e9e0",
+ "95": "#e1f7ee",
+ "100": "#ffffff"
+ }
+ },
+ "cyan": {
+ "name": "Cathedral Mist",
+ "dark": {
+ "0": "#000000",
+ "5": "#021620",
+ "10": "#0b2834",
+ "15": "#183a47",
+ "20": "#204858",
+ "25": "#245367",
+ "30": "#2a5e75",
+ "35": "#366a82",
+ "40": "#45768c",
+ "45": "#568094",
+ "50": "#668c9d",
+ "55": "#7798a7",
+ "60": "#86a4b1",
+ "65": "#90afbc",
+ "70": "#98b8c5",
+ "75": "#a3c2cf",
+ "80": "#b1d0dc",
+ "85": "#beddea",
+ "90": "#caeaf7",
+ "95": "#e0f5fe",
+ "100": "#ffffff"
+ }
+ },
+ "blue": {
+ "name": "Midnight Indigo",
+ "dark": {
+ "0": "#000000",
+ "5": "#080f26",
+ "10": "#0f1937",
+ "15": "#162145",
+ "20": "#1f2c54",
+ "25": "#243462",
+ "30": "#2a3b6e",
+ "35": "#35487c",
+ "40": "#445789",
+ "45": "#556795",
+ "50": "#6677a0",
+ "55": "#7787ac",
+ "60": "#8696b8",
+ "65": "#8aa1d8",
+ "70": "#96acd7",
+ "75": "#a3b5d6",
+ "80": "#b2c3e3",
+ "85": "#c3d2ee",
+ "90": "#d6e1f6",
+ "95": "#eaf0fc",
+ "100": "#ffffff"
+ }
+ },
+ "purple": {
+ "name": "Cathedral Plum",
+ "dark": {
+ "0": "#000000",
+ "5": "#1a0822",
+ "10": "#2b0d35",
+ "15": "#391347",
+ "20": "#481b58",
+ "25": "#511f64",
+ "30": "#5a2370",
+ "35": "#65307c",
+ "40": "#6f3f86",
+ "45": "#784f8d",
+ "50": "#815f94",
+ "55": "#896f9b",
+ "60": "#947da6",
+ "65": "#9f87b0",
+ "70": "#a790ba",
+ "75": "#b29bc4",
+ "80": "#c39adb",
+ "85": "#d2ade9",
+ "90": "#e5c9f7",
+ "95": "#f4e7fc",
+ "100": "#ffffff"
+ }
+ },
+ "pink": {
+ "name": "Rose Madder",
+ "dark": {
+ "0": "#000000",
+ "5": "#280510",
+ "10": "#430d20",
+ "15": "#5c182f",
+ "20": "#71223c",
+ "25": "#7f2844",
+ "30": "#8d2d4c",
+ "35": "#983958",
+ "40": "#9d4863",
+ "45": "#9f556d",
+ "50": "#a16276",
+ "55": "#a37082",
+ "60": "#aa7d8e",
+ "65": "#d97580",
+ "70": "#d28897",
+ "75": "#c89aab",
+ "80": "#d7aaba",
+ "85": "#e8bbcc",
+ "90": "#f4d2de",
+ "95": "#fce9f0",
+ "100": "#ffffff"
+ }
+ }
+} as const;
+
+export default palette;
diff --git a/packages/themes/gothic/src/gothicPalettes.test.ts b/packages/themes/gothic/src/gothicPalettes.test.ts
new file mode 100644
index 0000000000..68e43f719b
--- /dev/null
+++ b/packages/themes/gothic/src/gothicPalettes.test.ts
@@ -0,0 +1,63 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+import {describe, expect, it} from 'vitest';
+import {palette as gothicModePalettes} from './gothicPalettes.generated';
+import {gothicPalettes} from './gothicTheme';
+
+const stops = [
+ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
+ 100,
+] as const;
+
+const families = [
+ 'neutral',
+ 'blue',
+ 'cyan',
+ 'green',
+ 'orange',
+ 'pink',
+ 'purple',
+ 'red',
+ 'teal',
+ 'yellow',
+] as const;
+
+describe('gothic palette artifact', () => {
+ it('preserves the existing public shape with every reviewed dark stop', () => {
+ expect(Object.keys(gothicPalettes)).toEqual(families);
+ for (const familyName of families) {
+ const family = gothicPalettes[familyName];
+ expect(typeof family.hue).toBe('number');
+ expect(typeof family.chroma).toBe('number');
+ for (const stop of stops) {
+ expect(family[stop]).toMatch(/^#[0-9a-f]{6}$/i);
+ }
+ expect(family[0]).toBe('#000000');
+ expect(family[100]).toBe('#ffffff');
+ }
+ });
+
+ it('keeps Gothic semantic, categorical, and syntax anchors exact', () => {
+ expect(gothicPalettes.neutral[10]).toBe('#101314');
+ expect(gothicPalettes.neutral[20]).toBe('#24292D');
+ expect(gothicPalettes.neutral[40]).toBe('#495056');
+ expect(gothicPalettes.neutral[75]).toBe('#96A0AB');
+ expect(gothicPalettes.neutral[95]).toBe('#E8F1F6');
+
+ expect(gothicModePalettes.purple.dark[80]).toBe('#c39adb');
+ expect(gothicModePalettes.green.dark[70]).toBe('#a3c987');
+ expect(gothicModePalettes.blue.dark[65]).toBe('#8aa1d8');
+ expect(gothicModePalettes.yellow.dark[65]).toBe('#e6b85e');
+ expect(gothicModePalettes.yellow.dark[70]).toBe('#dec074');
+ expect(gothicModePalettes.pink.dark[65]).toBe('#d97580');
+ expect(gothicModePalettes.teal.dark[70]).toBe('#7cc5b3');
+
+ for (const familyName of families.filter(family => family !== 'neutral')) {
+ const family = gothicModePalettes[familyName].dark;
+ expect(family[20]).toMatch(/^#[0-9a-f]{6}$/i);
+ expect(family[30]).toMatch(/^#[0-9a-f]{6}$/i);
+ expect(family[60]).toMatch(/^#[0-9a-f]{6}$/i);
+ expect(family[75]).toMatch(/^#[0-9a-f]{6}$/i);
+ }
+ });
+});
diff --git a/packages/themes/gothic/src/gothicTheme.test.ts b/packages/themes/gothic/src/gothicTheme.test.ts
new file mode 100644
index 0000000000..c04dbc67dc
--- /dev/null
+++ b/packages/themes/gothic/src/gothicTheme.test.ts
@@ -0,0 +1,98 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+import {describe, expect, it} from 'vitest';
+import {resolveThemeTokens} from '@astryxdesign/core/theme';
+import {palette as gothicModePalettes} from './gothicPalettes.generated';
+import {gothicTheme} from './gothicTheme';
+
+const categoricalFamilies = [
+ 'blue',
+ 'cyan',
+ 'green',
+ 'orange',
+ 'pink',
+ 'purple',
+ 'red',
+ 'teal',
+ 'yellow',
+] as const;
+
+function linearize(channel: number): number {
+ const value = channel / 255;
+ return value <= 0.04045
+ ? value / 12.92
+ : Math.pow((value + 0.055) / 1.055, 2.4);
+}
+
+function luminance(color: string): number {
+ const [red, green, blue] = [1, 3, 5].map(index =>
+ Number.parseInt(color.slice(index, index + 2), 16),
+ );
+ return (
+ 0.2126 * linearize(red) +
+ 0.7152 * linearize(green) +
+ 0.0722 * linearize(blue)
+ );
+}
+
+function contrast(foreground: string, background: string): number {
+ const [lighter, darker] = [luminance(foreground), luminance(background)].sort(
+ (left, right) => right - left,
+ );
+ return (lighter + 0.05) / (darker + 0.05);
+}
+
+describe('gothic palette mapping', () => {
+ it('keeps the theme dark-only and maps its neutral surface ladder', () => {
+ const tokens = resolveThemeTokens(gothicTheme, {mode: 'dark'});
+ const neutral = gothicModePalettes.neutral.dark;
+
+ expect(tokens['--color-background-body']).toBe(neutral[10]);
+ expect(tokens['--color-background-surface']).toBe(neutral[10]);
+ expect(tokens['--color-background-card']).toBe(neutral[15]);
+ expect(tokens['--color-background-popover']).toBe(neutral[20]);
+ expect(tokens['--color-text-primary']).toBe(neutral[95]);
+ expect(tokens['--color-text-secondary']).toBe(neutral[75]);
+ });
+
+ it('maps syntax roles to reviewed jewel-tone anchors with AA comments', () => {
+ const tokens = resolveThemeTokens(gothicTheme, {mode: 'dark'});
+ expect(tokens).toMatchObject({
+ '--color-syntax-keyword': gothicModePalettes.purple.dark[80],
+ '--color-syntax-string': gothicModePalettes.green.dark[70],
+ '--color-syntax-comment': gothicModePalettes.neutral.dark[65],
+ '--color-syntax-number': gothicModePalettes.yellow.dark[70],
+ '--color-syntax-function': gothicModePalettes.blue.dark[65],
+ '--color-syntax-type': gothicModePalettes.purple.dark[80],
+ '--color-syntax-constant': gothicModePalettes.yellow.dark[65],
+ '--color-syntax-tag': gothicModePalettes.pink.dark[65],
+ '--color-syntax-attribute': gothicModePalettes.yellow.dark[70],
+ '--color-syntax-property': gothicModePalettes.teal.dark[70],
+ '--color-syntax-added-marker': gothicModePalettes.green.dark[70],
+ '--color-syntax-removed-marker': gothicModePalettes.pink.dark[65],
+ });
+ expect(
+ contrast(
+ gothicModePalettes.neutral.dark[65],
+ gothicModePalettes.neutral.dark[10],
+ ),
+ 'syntax comment text',
+ ).toBeGreaterThanOrEqual(4.5);
+ });
+
+ it('maps every categorical role to the reviewed pattern with AA text', () => {
+ const tokens = resolveThemeTokens(gothicTheme, {mode: 'dark'});
+ for (const family of categoricalFamilies) {
+ const ramp = gothicModePalettes[family].dark;
+ const textStop = family === 'pink' || family === 'yellow' ? 15 : 20;
+ expect(tokens[`--color-background-${family}`]).toBe(ramp[75]);
+ expect(tokens[`--color-border-${family}`]).toBe(ramp[60]);
+ expect(tokens[`--color-icon-${family}`]).toBe(ramp[30]);
+ expect(tokens[`--color-text-${family}`]).toBe(ramp[textStop]);
+ expect(
+ contrast(ramp[textStop], ramp[75]),
+ `${family} categorical text`,
+ ).toBeGreaterThanOrEqual(4.5);
+ }
+ });
+});
diff --git a/packages/themes/gothic/src/gothicTheme.ts b/packages/themes/gothic/src/gothicTheme.ts
index 345092f345..96c0719972 100644
--- a/packages/themes/gothic/src/gothicTheme.ts
+++ b/packages/themes/gothic/src/gothicTheme.ts
@@ -6,7 +6,6 @@
* A dark-only theme with deep blue-gray tones and a distressed display
* heading. Inspired by ink, manuscript, and noir typography.
*
- * Core palette: #E8F1F6, #96A0AB, #495056, #24292D, #101314
* Categorical colors follow a pastel-on-dark pattern (light backgrounds
* with dark text) — same in any system color preference.
*
@@ -15,6 +14,12 @@
import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
import {gothicIconRegistry} from './icons';
+import {gothicPaletteRefs} from './gothicPaletteRefs.generated';
+
+const {blue, cyan, green, neutral, orange, pink, purple, red, teal, yellow} =
+ gothicPaletteRefs;
+
+const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;
/**
* Gothic syntax palette — atmospheric tones drawn from the gothic
@@ -26,29 +31,24 @@ import {gothicIconRegistry} from './icons';
const gothicSyntax = defineSyntaxTheme({
name: 'astryx-gothic',
tokens: {
- keyword: '#c39adb', // Cathedral plum
- string: '#a3c987', // Forest moss
- comment: '#6b7079', // Faded ink
- number: '#dec074', // Aged gold
- function: '#8aa1d8', // Midnight indigo
- type: '#c39adb', // Cathedral plum
- variable: '#E8F1F6', // Parchment
- operator: '#96A0AB', // Mid neutral
- constant: '#e6b85e', // Candlelight amber
- tag: '#d97580', // Blood crimson
- attribute: '#dec074', // Aged gold
- property: '#7cc5b3', // Verdigris
- punctuation: '#7a8290', // Mid neutral
- background: '#101314',
- // Diff rows on the near-black background: any lighter wash lowers every
- // light token's contrast, so the rows take opaque hues at the
- // background's own luminance — a deep green and a deep red that read as
- // colour, not brightness — and every token keeps the contrast it has on
- // the plain background. Markers: forest moss and blood crimson.
- added: '#081408',
- removed: '#1e0a0a',
- 'added-marker': '#a3c987',
- 'removed-marker': '#d97580',
+ keyword: purple.dark[80],
+ string: green.dark[70],
+ comment: neutral.dark[65],
+ number: yellow.dark[70],
+ function: blue.dark[65],
+ type: purple.dark[80],
+ variable: neutral.dark[95],
+ operator: neutral.dark[75],
+ constant: yellow.dark[65],
+ tag: pink.dark[65],
+ attribute: yellow.dark[70],
+ property: teal.dark[70],
+ punctuation: neutral.dark[65],
+ background: neutral.dark[10],
+ added: green.dark[5],
+ removed: red.dark[5],
+ 'added-marker': green.dark[70],
+ 'removed-marker': pink.dark[65],
},
});
@@ -114,129 +114,99 @@ export const gothicTheme = defineTheme({
syntax: gothicSyntax,
tokens: {
- // =========================================================================
- // Colors — gothic dark palette (single values, dark-only)
- // Core: #E8F1F6, #96A0AB, #495056, #24292D, #101314
- // =========================================================================
-
- // Core semantic
- '--color-accent': '#E8F1F6',
- '--color-accent-muted': '#E8F1F620',
- '--color-neutral': '#E8F1F61A',
- '--color-background-surface': '#101314',
- '--color-background-body': '#101314',
- '--color-overlay': '#101314CC',
- '--color-overlay-hover': '#E8F1F60D',
- '--color-overlay-pressed': '#E8F1F61A',
- '--color-background-muted': '#24292D',
-
- // Text
- '--color-text-primary': '#E8F1F6',
- '--color-text-secondary': '#96A0AB',
- '--color-text-disabled': '#495056',
- '--color-text-accent': '#E8F1F6',
- '--color-on-dark': '#E8F1F6',
- '--color-on-light': '#101314',
- '--color-on-accent': '#101314',
- '--color-on-success': '#101314',
- '--color-on-error': '#101314',
- '--color-on-warning': '#101314',
-
- // Icon
- '--color-icon-accent': '#E8F1F6',
- '--color-icon-primary': '#E8F1F6',
- '--color-icon-secondary': '#96A0AB',
- '--color-icon-disabled': '#495056',
-
- // Surface variants
- '--color-background-card': '#1a1d20',
- '--color-background-popover': '#24292D',
- '--color-background-inverted': '#E8F1F6',
-
- // Status / Sentiment — dusty pastels matching the categorical
- // pattern. Used for status surfaces, destructive button bg, etc.
- '--color-success': '#b3c79a', // sage moss
- '--color-success-muted': '#b3c79a',
- '--color-error': '#c6a6a2', // dusty rose
- '--color-error-muted': '#c6a6a2',
- '--color-warning': '#d3c490', // aged gold
- '--color-warning-muted': '#d3c490',
-
- // Border
- '--color-border': '#E8F1F61A',
- '--color-border-emphasized': '#495056',
-
- // Effects
- '--color-skeleton': '#495056',
- '--color-shadow': '#0000004D',
- '--color-tint-hover': 'white',
-
- // =========================================================================
- // Categorical — dusty pastel-on-dark pattern
- // Hand-tuned dusty pastels (T75 with reduced chroma) — confident
- // but never bright. Neutral is a dark slate with white text — the
- // "no-color" variant earns its hierarchy by matching the page mood.
- // =========================================================================
-
- // Blue (periwinkle midnight)
- '--color-background-blue': '#a3b5d6',
- '--color-border-blue': '#8696b8',
- '--color-icon-blue': '#2a3b6e',
- '--color-text-blue': '#1f2c54',
-
- // Cyan (cathedral mist)
- '--color-background-cyan': '#a3c2cf',
- '--color-border-cyan': '#86a4b1',
- '--color-icon-cyan': '#2a5e75',
- '--color-text-cyan': '#204858',
-
- // Gray (dark slate — special: dark bg + light text)
- '--color-background-gray': '#3d4248',
- '--color-border-gray': '#5d646b',
- '--color-icon-gray': '#E8F1F6',
- '--color-text-gray': '#E8F1F6',
-
- // Green (sage moss)
- '--color-background-green': '#b3c79a',
- '--color-border-green': '#96a880',
- '--color-icon-green': '#3a5e2c',
- '--color-text-green': '#244023',
-
- // Orange (warm tan)
- '--color-background-orange': '#d3b89a',
- '--color-border-orange': '#b6987d',
- '--color-icon-orange': '#8a4818',
- '--color-text-orange': '#6e3812',
-
- // Pink (dusty rose)
- '--color-background-pink': '#c89aab',
- '--color-border-pink': '#aa7d8e',
- '--color-icon-pink': '#8d2d4c',
- '--color-text-pink': '#71223c',
-
- // Purple (muted plum)
- '--color-background-purple': '#b29bc4',
- '--color-border-purple': '#947da6',
- '--color-icon-purple': '#5a2370',
- '--color-text-purple': '#481b58',
-
- // Red (dusty rose)
- '--color-background-red': '#c6a6a2',
- '--color-border-red': '#a48581',
- '--color-icon-red': '#5e3a35',
- '--color-text-red': '#4a2520',
-
- // Teal (sage verdigris)
- '--color-background-teal': '#a3c2b6',
- '--color-border-teal': '#86a499',
- '--color-icon-teal': '#1f5e52',
- '--color-text-teal': '#174a40',
-
- // Yellow (aged gold)
- '--color-background-yellow': '#d3c490',
- '--color-border-yellow': '#b6a775',
- '--color-icon-yellow': '#876515',
- '--color-text-yellow': '#6c5010',
+ '--color-accent': neutral.dark[95],
+ '--color-accent-muted': withAlpha(neutral.dark[95], '20'),
+ '--color-neutral': withAlpha(neutral.dark[95], '1a'),
+ '--color-background-surface': neutral.dark[10],
+ '--color-background-body': neutral.dark[10],
+ '--color-overlay': withAlpha(neutral.dark[10], 'cc'),
+ '--color-overlay-hover': withAlpha(neutral.dark[95], '0d'),
+ '--color-overlay-pressed': withAlpha(neutral.dark[95], '1a'),
+ '--color-background-muted': neutral.dark[20],
+
+ '--color-text-primary': neutral.dark[95],
+ '--color-text-secondary': neutral.dark[75],
+ '--color-text-disabled': neutral.dark[40],
+ '--color-text-accent': neutral.dark[95],
+ '--color-on-dark': neutral.dark[95],
+ '--color-on-light': neutral.dark[10],
+ '--color-on-accent': neutral.dark[10],
+ '--color-on-success': neutral.dark[10],
+ '--color-on-error': neutral.dark[10],
+ '--color-on-warning': neutral.dark[10],
+
+ '--color-icon-accent': neutral.dark[95],
+ '--color-icon-primary': neutral.dark[95],
+ '--color-icon-secondary': neutral.dark[75],
+ '--color-icon-disabled': neutral.dark[40],
+
+ '--color-background-card': neutral.dark[15],
+ '--color-background-popover': neutral.dark[20],
+ '--color-background-inverted': neutral.dark[95],
+
+ '--color-success': green.dark[75],
+ '--color-success-muted': green.dark[75],
+ '--color-error': red.dark[75],
+ '--color-error-muted': red.dark[75],
+ '--color-warning': yellow.dark[75],
+ '--color-warning-muted': yellow.dark[75],
+
+ '--color-border': withAlpha(neutral.dark[95], '1a'),
+ '--color-border-emphasized': neutral.dark[40],
+
+ '--color-skeleton': neutral.dark[40],
+ '--color-shadow': withAlpha(neutral.dark[0], '4d'),
+ '--color-tint-hover': neutral.dark[100],
+
+ '--color-background-blue': blue.dark[75],
+ '--color-border-blue': blue.dark[60],
+ '--color-icon-blue': blue.dark[30],
+ '--color-text-blue': blue.dark[20],
+
+ '--color-background-cyan': cyan.dark[75],
+ '--color-border-cyan': cyan.dark[60],
+ '--color-icon-cyan': cyan.dark[30],
+ '--color-text-cyan': cyan.dark[20],
+
+ '--color-background-gray': neutral.dark[35],
+ '--color-border-gray': neutral.dark[50],
+ '--color-icon-gray': neutral.dark[95],
+ '--color-text-gray': neutral.dark[95],
+
+ '--color-background-green': green.dark[75],
+ '--color-border-green': green.dark[60],
+ '--color-icon-green': green.dark[30],
+ '--color-text-green': green.dark[20],
+
+ '--color-background-orange': orange.dark[75],
+ '--color-border-orange': orange.dark[60],
+ '--color-icon-orange': orange.dark[30],
+ '--color-text-orange': orange.dark[20],
+
+ '--color-background-pink': pink.dark[75],
+ '--color-border-pink': pink.dark[60],
+ '--color-icon-pink': pink.dark[30],
+ '--color-text-pink': pink.dark[15],
+
+ '--color-background-purple': purple.dark[75],
+ '--color-border-purple': purple.dark[60],
+ '--color-icon-purple': purple.dark[30],
+ '--color-text-purple': purple.dark[20],
+
+ '--color-background-red': red.dark[75],
+ '--color-border-red': red.dark[60],
+ '--color-icon-red': red.dark[30],
+ '--color-text-red': red.dark[20],
+
+ '--color-background-teal': teal.dark[75],
+ '--color-border-teal': teal.dark[60],
+ '--color-icon-teal': teal.dark[30],
+ '--color-text-teal': teal.dark[20],
+
+ '--color-background-yellow': yellow.dark[75],
+ '--color-border-yellow': yellow.dark[60],
+ '--color-icon-yellow': yellow.dark[30],
+ '--color-text-yellow': yellow.dark[15],
// =========================================================================
// Radius — subtle rounding (original gothic)
@@ -254,14 +224,14 @@ export const gothicTheme = defineTheme({
// =========================================================================
// Shadows — restrained, atmospheric
// =========================================================================
- '--shadow-low': '0 2px 4px #00000033, 0 4px 8px #00000040',
- '--shadow-med': '0 2px 4px #00000033, 0 4px 12px #00000040',
- '--shadow-high': '0 4px 6px #00000040, 0 12px 24px #0000004D',
- '--shadow-inset-hover': 'inset 0px 0px 0px 1px #96A0AB30',
- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #96A0AB50',
- '--shadow-inset-success': 'inset 0px 0px 0px 1px #87b06a50',
- '--shadow-inset-warning': 'inset 0px 0px 0px 1px #d6b56a50',
- '--shadow-inset-error': 'inset 0px 0px 0px 1px #d4485150',
+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.dark[0], '33')}, 0 4px 8px ${withAlpha(neutral.dark[0], '40')}`,
+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.dark[0], '33')}, 0 4px 12px ${withAlpha(neutral.dark[0], '40')}`,
+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.dark[0], '40')}, 0 12px 24px ${withAlpha(neutral.dark[0], '4d')}`,
+ '--shadow-inset-hover': `inset 0 0 0 1px ${withAlpha(neutral.dark[75], '30')}`,
+ '--shadow-inset-selected': `inset 0 0 0 2px ${withAlpha(neutral.dark[75], '50')}`,
+ '--shadow-inset-success': `inset 0 0 0 1px ${withAlpha(green.dark[55], '50')}`,
+ '--shadow-inset-warning': `inset 0 0 0 1px ${withAlpha(yellow.dark[75], '50')}`,
+ '--shadow-inset-error': `inset 0 0 0 1px ${withAlpha(red.dark[75], '50')}`,
},
components: {
@@ -424,11 +394,11 @@ export const gothicTheme = defineTheme({
});
/**
- * Raw tonal palettes — every color at every tone step (0–100 in 5s).
- * Use these for custom components or data visualization.
- *
- * Categorical hues (blue, green, etc.) follow gothic gem-tone hues.
- * Neutral mirrors the original gothic blue-gray palette (H≈210).
+ * Frozen released compatibility palettes. These values preserve the public
+ * `gothicPalettes` shape and values for existing consumers; the maintained
+ * theme renders selected stops from `gothicPalettes.generated.ts` instead.
+ * Components should consume semantic theme tokens, and charts should use the
+ * data-visualization color API.
*/
export const gothicPalettes = {
// Neutral — H=210 C=4 (cool blue-gray, original gothic)
diff --git a/packages/themes/gothic/src/source.ts b/packages/themes/gothic/src/source.ts
index 1f3aeae4e3..3e7c921ad0 100644
--- a/packages/themes/gothic/src/source.ts
+++ b/packages/themes/gothic/src/source.ts
@@ -1,4 +1,4 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-export {gothicTheme, gothicPalettes} from './gothicTheme';
+export {gothicPalettes, gothicTheme} from './gothicTheme';
export {gothicIconRegistry} from './icons';
diff --git a/scripts/check-badge-contrast.test.mjs b/scripts/check-badge-contrast.test.mjs
index aa31b254bb..4fc913f306 100644
--- a/scripts/check-badge-contrast.test.mjs
+++ b/scripts/check-badge-contrast.test.mjs
@@ -104,7 +104,12 @@ function parseHex(hex) {
function flatten(top, base) {
if (top.a >= 1) return top;
const mix = (t, b) => Math.round(t * top.a + b * (1 - top.a));
- return {r: mix(top.r, base.r), g: mix(top.g, base.g), b: mix(top.b, base.b), a: 1};
+ return {
+ r: mix(top.r, base.r),
+ g: mix(top.g, base.g),
+ b: mix(top.b, base.b),
+ a: 1,
+ };
}
function luminance({r, g, b}) {
@@ -154,7 +159,11 @@ function badgePairs() {
for (let modeIndex = 0; modeIndex < MODES.length; modeIndex++) {
const fgHex = resolve(block.color ?? baseColor, theme, modeIndex);
- const bgHex = resolve(block.backgroundColor ?? baseBg, theme, modeIndex);
+ const bgHex = resolve(
+ block.backgroundColor ?? baseBg,
+ theme,
+ modeIndex,
+ );
if (!fgHex || !bgHex) continue; // not expressible as a flat pair
const surface = surfaceOf(theme, modeIndex);
@@ -180,10 +189,9 @@ const THEMES_WITH_BADGE_BLOCK = ['butter', 'gothic', 'neutral', 'stone', 'y2k'];
/**
* Pre-existing shortfalls this guard records rather than silently tolerates.
*
- * Both themes pin these fills to brand values ("pinned to the brand colors
- * from the spec"), so moving them is a design call, not a bug fix. The guard
- * asserts the set matches exactly, so a new shortfall fails the build and a
- * fixed one fails until it's deleted from this list.
+ * Butter pins these fills to brand values, so moving them is a design call,
+ * not a bug fix. The guard asserts the set matches exactly, so a new shortfall
+ * fails the build and a fixed one fails until it is deleted from this list.
*/
const KNOWN_GAPS = [
'butter/dark variant:error',
@@ -192,8 +200,6 @@ const KNOWN_GAPS = [
'butter/light variant:error',
'butter/light variant:info',
'butter/light variant:neutral',
- 'gothic/dark variant:warning',
- 'gothic/light variant:warning',
];
describe('Badge label contrast', () => {
@@ -234,17 +240,19 @@ describe('Badge label contrast', () => {
it('meets WCAG AA (4.5:1) for every badge variant in both colour schemes', () => {
const failures = rows
.filter(r => r.ratio < AA_NORMAL)
- .map(
- r =>
- `${label(r)} — ${r.fg} on ${r.bg} = ${r.ratio.toFixed(2)}:1`,
- );
+ .map(r => `${label(r)} — ${r.fg} on ${r.bg} = ${r.ratio.toFixed(2)}:1`);
- const unexpected = failures.filter(f => !KNOWN_GAPS.includes(f.split(' — ')[0]));
+ const unexpected = failures.filter(
+ f => !KNOWN_GAPS.includes(f.split(' — ')[0]),
+ );
expect(unexpected).toEqual([]);
});
it('keeps the known-gap list exact, so a fixed pair cannot linger', () => {
- const failing = rows.filter(r => r.ratio < AA_NORMAL).map(label).sort();
+ const failing = rows
+ .filter(r => r.ratio < AA_NORMAL)
+ .map(label)
+ .sort();
expect(failing).toEqual(KNOWN_GAPS);
});
});
diff --git a/scripts/generate-gothic-palette-refs.mjs b/scripts/generate-gothic-palette-refs.mjs
new file mode 100644
index 0000000000..32418435ed
--- /dev/null
+++ b/scripts/generate-gothic-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/gothic/src/gothicTheme.ts';
+export const FULL_PALETTE_REL =
+ 'packages/themes/gothic/src/gothicPalettes.generated.ts';
+export const SELECTED_REFS_REL =
+ 'packages/themes/gothic/src/gothicPaletteRefs.generated.ts';
+export const TEMPLATE_REFS_REL =
+ 'packages/cli/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts';
+
+const generator = createSelectedPaletteRefGenerator({
+ themeDisplayName: 'Gothic',
+ paletteRefsIdentifier: 'gothicPaletteRefs',
+ themeSourceRel: THEME_SOURCE_REL,
+ fullPaletteRel: FULL_PALETTE_REL,
+ selectedRefsRel: SELECTED_REFS_REL,
+ templateRefsRel: TEMPLATE_REFS_REL,
+ regenerateCommand: 'pnpm generate:gothic-palette-refs',
+});
+
+export function generateGothicPaletteRefs({root = ROOT, check = false} = {}) {
+ return generator.generateSelectedPaletteRefs({root, check});
+}
+
+function main() {
+ const check = process.argv.includes('--check');
+ const result = generateGothicPaletteRefs({check});
+ const count = countSelectedRefs(result.selected);
+
+ if (check && result.problems.length > 0) {
+ process.stderr.write(
+ `\nGothic selected palette refs are out of sync:\n` +
+ result.problems
+ .map(
+ problem =>
+ ` - ${path.relative(ROOT, problem.output)} ${problem.reason}`,
+ )
+ .join('\n') +
+ `\nRun: pnpm generate:gothic-palette-refs\n\n`,
+ );
+ return 1;
+ }
+
+ if (check) {
+ process.stdout.write(
+ `Gothic 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-gothic-palette-refs.test.mjs b/scripts/generate-gothic-palette-refs.test.mjs
new file mode 100644
index 0000000000..cc5fcbb223
--- /dev/null
+++ b/scripts/generate-gothic-palette-refs.test.mjs
@@ -0,0 +1,152 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file Focused tests for Gothic's selected palette-reference wrapper.
+ * @input Synthetic Gothic theme references and full-palette literals.
+ * @output Proof that Gothic binds the shared generator to both required outputs.
+ * @position Regression coverage for generate-gothic-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,
+ generateGothicPaletteRefs,
+} from './generate-gothic-palette-refs.mjs';
+
+const FULL_PALETTE = `export const palette = {
+ blue: {
+ name: 'Blue',
+ dark: {25: '#778899', 80: '#aabbcc'},
+ },
+ neutral: {
+ name: 'Gothic Neutral',
+ dark: {5: '#111111'},
+ },
+} as const;
+`;
+
+const THEME_SOURCE = `
+const {blue: gothicBlue, neutral} = gothicPaletteRefs;
+export const gothicTheme = {
+ first: gothicBlue.dark[80],
+ direct: gothicPaletteRefs.blue.dark[25],
+ repeated: gothicBlue.dark[80],
+ surface: neutral.dark[5],
+};
+`;
+
+describe('Gothic 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-gothic-palette-'),
+ );
+ try {
+ fs.copyFileSync(
+ path.join(root, 'packages/themes/gothic/palette.config.json'),
+ path.join(temp, 'palette.config.json'),
+ );
+ themePaletteGenerate(
+ 'palette.config.json',
+ {
+ out: 'gothicPalettes.generated.ts',
+ preview: 'gothic-palette-preview.html',
+ },
+ {cwd: temp},
+ );
+
+ const generated = fs.readFileSync(
+ path.join(temp, 'gothicPalettes.generated.ts'),
+ 'utf8',
+ );
+ const committed = fs
+ .readFileSync(
+ path.join(
+ root,
+ 'packages/themes/gothic/src/gothicPalettes.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, 'gothicPalettes.generated.receipt.json'),
+ 'utf8',
+ ),
+ ),
+ JSON.parse(
+ fs.readFileSync(
+ path.join(
+ root,
+ 'packages/themes/gothic/src/gothicPalettes.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-gothic-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 = generateGothicPaletteRefs({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 Gothic's",
+ );
+ expect(generated.content).toContain(
+ '// theme source. Regenerate with `pnpm generate:gothic-palette-refs`.',
+ );
+ expect(generated.content).toContain('export const gothicPaletteRefs = {');
+ expect(generated.content).toContain(
+ "dark: {25: '#778899', 80: '#aabbcc'}",
+ );
+ expect(generated.content).toContain('export default gothicPaletteRefs;');
+ for (const output of generated.outputs) {
+ expect(fs.readFileSync(output, 'utf-8')).toBe(generated.content);
+ }
+
+ expect(generateGothicPaletteRefs({root, check: true}).problems).toEqual(
+ [],
+ );
+ fs.appendFileSync(path.join(root, TEMPLATE_REFS_REL), '// stale\n');
+ expect(generateGothicPaletteRefs({root, check: true}).problems).toEqual([
+ {output: path.join(root, TEMPLATE_REFS_REL), reason: 'differs'},
+ ]);
+ } finally {
+ fs.rmSync(root, {recursive: true, force: true});
+ }
+ });
+});