Following is a shadcn/ui theme built around a light violet primary color (#eeebf4) with muted light violet accents (#c5bcd7). The light mode uses a neutral background (#f9f7fc). Dark mode keeps the light violet primary (#eeebf4) on a violet-tinted background (#07050a).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f7fcghostwhite | #07050ablack |
| Foreground | #06020dblack | #fcfcfdwhite |
| Card | #f9f7fcghostwhite | #07050ablack |
| Card foreground | #06020dblack | #fcfcfdwhite |
| Popover | #f9f7fcghostwhite | #07050ablack |
| Popover foreground | #06020dblack | #fcfcfdwhite |
| Primary | #eeebf4lavender | #eeebf4lavender |
| Primary foreground | #4d3c72darkslateblue | #4d3c72darkslateblue |
| Secondary | #dedbe6gainsboro | #1e1c21black |
| Secondary foreground | #423a55darkslategray | #b6b2bdsilver |
| Muted | #efeff1whitesmoke | #0f0e10black |
| Muted foreground | #4b4950darkslategray | #b1afb6darkgray |
| Accent | #c5bcd7thistle | #302b3bdarkslategray |
| Accent foreground | #2c243ddarkslategray | #c9c4d4thistle |
| Destructive | #cc3d00firebrick | #ff621ftomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #eeebf4lavender | #eeebf4lavender |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.36:1 | AAA |
| Text on card | 19.36:1 | AAA |
| Primary button | 8.08:1 | AAA |
| Secondary button | 7.79:1 | AAA |
| Muted text | 7.71:1 | AAA |
| Accent | 8.08:1 | AAA |
| Destructive | 4.95:1 | AA |
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 8.08:1 | AAA |
| Secondary button | 8.11:1 | AAA |
| Muted text | 8.85:1 | AAA |
| Accent | 8.00:1 | AAA |
| Destructive | 7.01:1 | AAA |
Paste this into your globals.css to use Following in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.98 0.007 300.656);
--foreground: oklch(0.106 0.035 300.838);
--muted: oklch(0.952 0.003 300.724);
--muted-foreground: oklch(0.409 0.013 300.245);
--popover: oklch(0.98 0.007 300.656);
--popover-foreground: oklch(0.106 0.035 300.838);
--card: oklch(0.98 0.007 300.656);
--card-foreground: oklch(0.106 0.035 300.838);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.945 0.013 300.541);
--primary-foreground: oklch(0.4 0.09 296.748);
--secondary: oklch(0.896 0.016 300.47);
--secondary-foreground: oklch(0.368 0.047 298.607);
--accent: oklch(0.811 0.038 299.988);
--accent-foreground: oklch(0.282 0.045 298.044);
--destructive: oklch(0.566 0.188 37.373);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.945 0.013 300.541);
--chart-1: oklch(0.945 0.013 300.541);
--chart-2: oklch(0.896 0.016 300.47);
--chart-3: oklch(0.811 0.038 299.988);
--chart-4: oklch(0.923 0.012 300.553);
--chart-5: oklch(0.944 0.014 300.518);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.015 300.979);
--foreground: oklch(0.991 0.001 300.746);
--muted: oklch(0.167 0.004 300.384);
--muted-foreground: oklch(0.757 0.011 300.526);
--popover: oklch(0.121 0.015 300.979);
--popover-foreground: oklch(0.991 0.001 300.746);
--card: oklch(0.121 0.015 300.979);
--card-foreground: oklch(0.991 0.001 300.746);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.945 0.013 300.541);
--primary-foreground: oklch(0.4 0.09 296.748);
--secondary: oklch(0.231 0.01 300.083);
--secondary-foreground: oklch(0.77 0.017 300.414);
--accent: oklch(0.302 0.028 299.223);
--accent-foreground: oklch(0.83 0.022 300.336);
--destructive: oklch(0.692 0.204 39.972);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.945 0.013 300.541);
--chart-1: oklch(0.945 0.013 300.541);
--chart-2: oklch(0.231 0.01 300.083);
--chart-3: oklch(0.302 0.028 299.223);
--chart-4: oklch(0.262 0.012 300.035);
--chart-5: oklch(0.944 0.014 300.518);
}