Rough is a shadcn/ui theme built around a neutral gray primary color (#d4d3ce) with neutral gray accents (#cecfd4). The light mode uses a neutral background (#fbfbf8). Dark mode keeps the neutral gray primary (#d4d3ce) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfbf8snow | #000000black |
| Foreground | #100e05black | #f8f8f7whitesmoke |
| Card | #fbfbf8snow | #000000black |
| Card foreground | #100e05black | #f8f8f7whitesmoke |
| Popover | #fbfbf8snow | #000000black |
| Popover foreground | #100e05black | #f8f8f7whitesmoke |
| Primary | #d4d3celightgrey | #d4d3celightgrey |
| Primary foreground | #3c3a34darkslategray | #3c3a34darkslategray |
| Secondary | #cecfd4lightgrey | #cecfd4lightgrey |
| Secondary foreground | #34363cdarkslategray | #34363cdarkslategray |
| Muted | #d7d8dbgainsboro | #242528darkslategray |
| Muted foreground | #575c70dimgray | #8f94a8lightslategray |
| Accent | #cecfd4lightgrey | #cecfd4lightgrey |
| Accent foreground | #34363cdarkslategray | #34363cdarkslategray |
| Destructive | #6b0505maroon | #ea0b0bred |
| Destructive foreground | #fba7a7lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d4d3celightgrey | #d4d3celightgrey |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.63:1 | AAA |
| Text on card | 18.63:1 | AAA |
| Primary button | 7.59:1 | AAA |
| Secondary button | 7.77:1 | AAA |
| Muted text | 4.63:1 | AA |
| Accent | 7.77:1 | AAA |
| Destructive | 6.77:1 | AA |
| Text on background | 19.76:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 7.59:1 | AAA |
| Secondary button | 7.77:1 | AAA |
| Muted text | 5.07:1 | AA |
| Accent | 7.77:1 | AAA |
| Destructive | 4.62:1 | AA |
Paste this into your globals.css to use Rough in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.003 95.075);
--foreground: oklch(0.161 0.02 97.299);
--muted: oklch(0.881 0.004 274.975);
--muted-foreground: oklch(0.477 0.034 274.043);
--popover: oklch(0.987 0.003 95.075);
--popover-foreground: oklch(0.161 0.02 97.299);
--card: oklch(0.987 0.003 95.075);
--card-foreground: oklch(0.161 0.02 97.299);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.867 0.007 95.13);
--primary-foreground: oklch(0.35 0.011 95.372);
--secondary: oklch(0.856 0.007 274.931);
--secondary-foreground: oklch(0.333 0.011 274.597);
--accent: oklch(0.856 0.007 274.931);
--accent-foreground: oklch(0.333 0.011 274.597);
--destructive: oklch(0.335 0.133 28.43);
--destructive-foreground: oklch(0.811 0.099 19.444);
--ring: oklch(0.867 0.007 95.13);
--chart-1: oklch(0.867 0.007 95.13);
--chart-2: oklch(0.856 0.007 274.931);
--chart-3: oklch(0.856 0.007 274.931);
--chart-4: oklch(0.88 0.006 274.951);
--chart-5: oklch(0.869 0.01 95.17);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.979 0.002 95.056);
--muted: oklch(0.265 0.006 274.76);
--muted-foreground: oklch(0.669 0.031 274.415);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.979 0.002 95.056);
--card: oklch(0 0 0);
--card-foreground: oklch(0.979 0.002 95.056);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.867 0.007 95.13);
--primary-foreground: oklch(0.35 0.011 95.372);
--secondary: oklch(0.856 0.007 274.931);
--secondary-foreground: oklch(0.333 0.011 274.597);
--accent: oklch(0.856 0.007 274.931);
--accent-foreground: oklch(0.333 0.011 274.597);
--destructive: oklch(0.591 0.239 28.906);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.867 0.007 95.13);
--chart-1: oklch(0.867 0.007 95.13);
--chart-2: oklch(0.856 0.007 274.931);
--chart-3: oklch(0.856 0.007 274.931);
--chart-4: oklch(0.88 0.006 274.951);
--chart-5: oklch(0.869 0.01 95.17);
}