Worn is a shadcn/ui theme built around a near-black primary color (#040506) with near-black accents (#040406). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the near-black primary (#040506) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfcfdwhite | #000000black |
| Foreground | #030812black | #f6f7f9whitesmoke |
| Card | #f8f9fcghostwhite | #030303black |
| Card foreground | #02060dblack | #f9fafbghostwhite |
| Popover | #f8f9fcghostwhite | #030303black |
| Popover foreground | #02060dblack | #f9fafbghostwhite |
| Primary | #040506black | #040506black |
| Primary foreground | #8998b3lightslategray | #8998b3lightslategray |
| Secondary | #040606black | #040606black |
| Secondary foreground | #89aeb3darkgray | #89aeb3darkgray |
| Muted | #dfeaeclavender | #131e20black |
| Muted foreground | #455759darkslategray | #a6b7badarkgray |
| Accent | #040406black | #040406black |
| Accent foreground | #8e89b3lightslategray | #8e89b3lightslategray |
| Destructive | #6d1408maroon | #f04933tomato |
| Destructive foreground | #f9b7aelightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #040506black | #040506black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.56:1 | AAA |
| Text on card | 19.33:1 | AAA |
| Primary button | 7.00:1 | AAA |
| Secondary button | 8.48:1 | AAA |
| Muted text | 6.21:1 | AA |
| Accent | 6.22:1 | AA |
| Destructive | 7.07:1 | AAA |
| Text on background | 19.59:1 | AAA |
| Text on card | 19.78:1 | AAA |
| Primary button | 7.00:1 | AAA |
| Secondary button | 8.48:1 | AAA |
| Muted text | 8.16:1 | AAA |
| Accent | 6.22:1 | AA |
| Destructive | 3.68:1 | AA Large |
Paste this into your globals.css to use Worn in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 261.514);
--foreground: oklch(0.133 0.025 253.419);
--muted: oklch(0.93 0.013 207.88);
--muted-foreground: oklch(0.441 0.022 207.845);
--popover: oklch(0.983 0.003 261.513);
--popover-foreground: oklch(0.121 0.021 251.075);
--card: oklch(0.983 0.003 261.513);
--card-foreground: oklch(0.121 0.021 251.075);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.113 0.005 258.587);
--primary-foreground: oklch(0.678 0.044 261.372);
--secondary: oklch(0.118 0.005 206.53);
--secondary-foreground: oklch(0.725 0.041 207.857);
--accent: oklch(0.109 0.008 291.921);
--accent-foreground: oklch(0.65 0.063 290.636);
--destructive: oklch(0.35 0.125 31.072);
--destructive-foreground: oklch(0.838 0.078 27.339);
--ring: oklch(0.113 0.005 258.587);
--chart-1: oklch(0.113 0.005 258.587);
--chart-2: oklch(0.118 0.005 206.53);
--chart-3: oklch(0.109 0.008 291.921);
--chart-4: oklch(0.163 0.008 207.847);
--chart-5: oklch(0.112 0.006 258.165);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.976 0.003 261.513);
--muted: oklch(0.227 0.017 207.93);
--muted-foreground: oklch(0.768 0.02 207.848);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.984 0.002 261.514);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.984 0.002 261.514);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.113 0.005 258.587);
--primary-foreground: oklch(0.678 0.044 261.372);
--secondary: oklch(0.118 0.005 206.53);
--secondary-foreground: oklch(0.725 0.041 207.857);
--accent: oklch(0.109 0.008 291.921);
--accent-foreground: oklch(0.65 0.063 290.636);
--destructive: oklch(0.641 0.207 30.822);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.113 0.005 258.587);
--chart-1: oklch(0.113 0.005 258.587);
--chart-2: oklch(0.118 0.005 206.53);
--chart-3: oklch(0.109 0.008 291.921);
--chart-4: oklch(0.163 0.008 207.847);
--chart-5: oklch(0.112 0.006 258.165);
}