Amethyst is a shadcn/ui theme built around a near-white primary color (#ffffff) with vivid deep violet accents (#450070). The light mode uses a violet-tinted background (#160024). Dark mode keeps the near-white primary (#ffffff) on a violet-tinted background (#160024).
| Token | Light | Dark |
|---|---|---|
| Background | #160024black | #160024black |
| Foreground | #d4d4d4lightgrey | #d4d4d4lightgrey |
| Card | #10001ablack | #10001ablack |
| Card foreground | #e0e0e0gainsboro | #e0e0e0gainsboro |
| Popover | #0d0014black | #0d0014black |
| Popover foreground | #edededwhitesmoke | #edededwhitesmoke |
| Primary | #ffffffwhite | #ffffffwhite |
| Primary foreground | #333333darkslategray | #333333darkslategray |
| Secondary | #404040darkslategray | #404040darkslategray |
| Secondary foreground | #d9d9d9gainsboro | #d9d9d9gainsboro |
| Muted | #27222bdarkslategray | #27222bdarkslategray |
| Muted foreground | #a89bb0darkgray | #a89bb0darkgray |
| Accent | #450070indigo | #450070indigo |
| Accent foreground | #dca3ffplum | #dca3ffplum |
| Destructive | #f93c1forangered | #f93c1forangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #25033amidnightblue | #25033amidnightblue |
| Input | #2e0449midnightblue | #2e0449midnightblue |
| Ring | #ffffffwhite | #ffffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 13.37:1 | AAA |
| Text on card | 15.35:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 5.92:1 | AA |
| Accent | 7.20:1 | AAA |
| Destructive | 3.67:1 | AA Large |
| Text on background | 13.37:1 | AAA |
| Text on card | 15.35:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 5.92:1 | AA |
| Accent | 7.20:1 | AAA |
| Destructive | 3.67:1 | AA Large |
Paste this into your globals.css to use Amethyst in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.154 0.078 310.172);
--foreground: oklch(0.869 0 165.964);
--muted: oklch(0.261 0.019 312.499);
--muted-foreground: oklch(0.708 0.034 312.659);
--popover: oklch(0.118 0.059 313.723);
--popover-foreground: oklch(0.947 0 180);
--card: oklch(0.131 0.065 312.254);
--card-foreground: oklch(0.908 0 180);
--border: oklch(0.21 0.099 307.967);
--input: oklch(0.241 0.116 307.196);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.313 0.162 305.055);
--accent-foreground: oklch(0.801 0.139 311.765);
--destructive: oklch(0.644 0.228 31.617);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.313 0.162 305.055);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.154 0.078 310.172);
--foreground: oklch(0.869 0 165.964);
--muted: oklch(0.261 0.019 312.499);
--muted-foreground: oklch(0.708 0.034 312.659);
--popover: oklch(0.118 0.059 313.723);
--popover-foreground: oklch(0.947 0 180);
--card: oklch(0.131 0.065 312.254);
--card-foreground: oklch(0.908 0 180);
--border: oklch(0.21 0.099 307.967);
--input: oklch(0.241 0.116 307.196);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.313 0.162 305.055);
--accent-foreground: oklch(0.801 0.139 311.765);
--destructive: oklch(0.644 0.228 31.617);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.313 0.162 305.055);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}