Violet is a shadcn/ui theme built around a muted deep teal primary color (#242d2e) with muted deep blue accents (#24282e). The light mode uses a neutral background (#fbfdfd). Dark mode keeps the muted deep teal primary (#242d2e) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfdfdwhite | #000000black |
| Foreground | #010404black | #f6f8f9whitesmoke |
| Card | #f8fcfcmintcream | #030303black |
| Card foreground | #000000black | #f9fbfbghostwhite |
| Popover | #f8fcfcmintcream | #030303black |
| Popover foreground | #000000black | #f9fbfbghostwhite |
| Primary | #242d2edarkslategray | #242d2edarkslategray |
| Primary foreground | #bac8c9silver | #bac8c9silver |
| Secondary | #242e29darkslategray | #242e29darkslategray |
| Secondary foreground | #bac9c3silver | #bac9c3silver |
| Muted | #e3eee9lavender | #111c18black |
| Muted foreground | #404543darkslategray | #babfbdsilver |
| Accent | #24282edarkslategray | #24282edarkslategray |
| Accent foreground | #bac1c9silver | #bac1c9silver |
| Destructive | #8a1905darkred | #dd2808orangered |
| Destructive foreground | #fdccc4pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #242d2edarkslategray | #242d2edarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.22:1 | AAA |
| Text on card | 20.28:1 | AAA |
| Primary button | 8.17:1 | AAA |
| Secondary button | 8.19:1 | AAA |
| Muted text | 8.18:1 | AAA |
| Accent | 8.13:1 | AAA |
| Destructive | 6.58:1 | AA |
| Text on background | 19.71:1 | AAA |
| Text on card | 19.91:1 | AAA |
| Primary button | 8.17:1 | AAA |
| Secondary button | 8.19:1 | AAA |
| Muted text | 9.33:1 | AAA |
| Accent | 8.13:1 | AAA |
| Destructive | 4.77:1 | AA |
Paste this into your globals.css to use Violet in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.002 200.864);
--foreground: oklch(0.098 0.009 198.964);
--muted: oklch(0.938 0.013 167.412);
--muted-foreground: oklch(0.384 0.008 167.222);
--popover: oklch(0.987 0.004 200.838);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.987 0.004 200.838);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.289 0.013 200.397);
--primary-foreground: oklch(0.824 0.015 200.669);
--secondary: oklch(0.289 0.016 166.217);
--secondary-foreground: oklch(0.823 0.018 167.181);
--accent: oklch(0.276 0.012 253.473);
--accent-foreground: oklch(0.808 0.014 253.328);
--destructive: oklch(0.411 0.15 32.074);
--destructive-foreground: oklch(0.886 0.056 29.829);
--ring: oklch(0.289 0.013 200.397);
--chart-1: oklch(0.289 0.013 200.397);
--chart-2: oklch(0.289 0.016 166.217);
--chart-3: oklch(0.276 0.012 253.473);
--chart-4: oklch(0.321 0.018 166.15);
--chart-5: oklch(0.292 0.016 200.307);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.979 0.002 200.858);
--muted: oklch(0.216 0.019 165.152);
--muted-foreground: oklch(0.801 0.007 167.578);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.986 0.002 200.869);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.986 0.002 200.869);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.289 0.013 200.397);
--primary-foreground: oklch(0.824 0.015 200.669);
--secondary: oklch(0.289 0.016 166.217);
--secondary-foreground: oklch(0.823 0.018 167.181);
--accent: oklch(0.276 0.012 253.473);
--accent-foreground: oklch(0.808 0.014 253.328);
--destructive: oklch(0.579 0.218 31.612);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.289 0.013 200.397);
--chart-1: oklch(0.289 0.013 200.397);
--chart-2: oklch(0.289 0.016 166.217);
--chart-3: oklch(0.276 0.012 253.473);
--chart-4: oklch(0.321 0.018 166.15);
--chart-5: oklch(0.292 0.016 200.307);
}