Purple is a shadcn/ui theme built around a muted light blue primary color (#d0d5dd) with muted light indigo accents (#d1d0dd). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the muted light blue primary (#d0d5dd) on a neutral background (#030507).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfcfdwhite | #030507black |
| Foreground | #020409black | #f5f7fawhitesmoke |
| Card | #f8fafbghostwhite | #04070bblack |
| Card foreground | #010204black | #f8fafcghostwhite |
| Popover | #fcfcfdwhite | #030507black |
| Popover foreground | #020409black | #f5f7fawhitesmoke |
| Primary | #d0d5ddlightgrey | #d0d5ddlightgrey |
| Primary foreground | #333b47darkslategray | #333b47darkslategray |
| Secondary | #d0dbddgainsboro | #d0dbddgainsboro |
| Secondary foreground | #334547darkslategray | #334547darkslategray |
| Muted | #ddeceelavender | #112022black |
| Muted foreground | #526d6fdimgray | #90aaaddarkgray |
| Accent | #d1d0ddlightgrey | #d1d0ddlightgrey |
| Accent foreground | #353347darkslategray | #353347darkslategray |
| Destructive | #ce4b12chocolate | #eb5819chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d0d5ddlightgrey | #d0d5ddlightgrey |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.03:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 7.65:1 | AAA |
| Secondary button | 7.14:1 | AAA |
| Muted text | 4.58:1 | AA |
| Accent | 8.00:1 | AAA |
| Destructive | 4.52:1 | AA |
| Text on background | 19.04:1 | AAA |
| Text on card | 19.28:1 | AAA |
| Primary button | 7.65:1 | AAA |
| Secondary button | 7.14:1 | AAA |
| Muted text | 6.80:1 | AA |
| Accent | 8.00:1 | AAA |
| Destructive | 3.53:1 | AA Large |
Paste this into your globals.css to use Purple in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.001 258.316);
--foreground: oklch(0.108 0.016 248.31);
--muted: oklch(0.933 0.016 204.869);
--muted-foreground: oklch(0.513 0.031 204.691);
--popover: oklch(0.992 0.001 258.316);
--popover-foreground: oklch(0.108 0.016 248.31);
--card: oklch(0.983 0.003 258.32);
--card-foreground: oklch(0.085 0.013 248.31);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.871 0.012 258.345);
--primary-foreground: oklch(0.351 0.023 258.367);
--secondary: oklch(0.884 0.013 204.884);
--secondary-foreground: oklch(0.376 0.023 204.691);
--accent: oklch(0.862 0.018 290.619);
--accent-foreground: oklch(0.333 0.034 288.973);
--destructive: oklch(0.586 0.178 39.464);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.871 0.012 258.345);
--chart-1: oklch(0.871 0.012 258.345);
--chart-2: oklch(0.884 0.013 204.884);
--chart-3: oklch(0.862 0.018 290.619);
--chart-4: oklch(0.906 0.01 204.905);
--chart-5: oklch(0.87 0.015 258.349);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.111 0.01 252.195);
--foreground: oklch(0.975 0.004 258.324);
--muted: oklch(0.231 0.02 204.721);
--muted-foreground: oklch(0.718 0.029 204.744);
--popover: oklch(0.111 0.01 252.195);
--popover-foreground: oklch(0.975 0.004 258.324);
--card: oklch(0.127 0.012 252.318);
--card-foreground: oklch(0.983 0.003 258.32);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.871 0.012 258.345);
--primary-foreground: oklch(0.351 0.023 258.367);
--secondary: oklch(0.884 0.013 204.884);
--secondary-foreground: oklch(0.376 0.023 204.691);
--accent: oklch(0.862 0.018 290.619);
--accent-foreground: oklch(0.333 0.034 288.973);
--destructive: oklch(0.648 0.194 39.763);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.871 0.012 258.345);
--chart-1: oklch(0.871 0.012 258.345);
--chart-2: oklch(0.884 0.013 204.884);
--chart-3: oklch(0.862 0.018 290.619);
--chart-4: oklch(0.906 0.01 204.905);
--chart-5: oklch(0.87 0.015 258.349);
}