Rich is a shadcn/ui theme built around a neutral gray primary color (#262528) with neutral gray accents (#282528). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#262528) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050307black |
| Foreground | #0c0514black | #faf9fbghostwhite |
| Card | #ffffffwhite | #050307black |
| Card foreground | #0c0514black | #faf9fbghostwhite |
| Popover | #ffffffwhite | #050307black |
| Popover foreground | #0c0514black | #faf9fbghostwhite |
| Primary | #262528darkslategray | #262528darkslategray |
| Primary foreground | #bfbdc2silver | #bfbdc2silver |
| Secondary | #252528darkslategray | #252528darkslategray |
| Secondary foreground | #bdbdc2silver | #bdbdc2silver |
| Muted | #eaebf0lavender | #0f0f15black |
| Muted foreground | #424357darkslategray | #a8a9bddarkgray |
| Accent | #282528darkslategray | #282528darkslategray |
| Accent foreground | #c2bdc2silver | #c2bdc2silver |
| Destructive | #c81009firebrick | #f53932crimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #262528darkslategray | #262528darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.04:1 | AAA |
| Text on card | 20.04:1 | AAA |
| Primary button | 8.20:1 | AAA |
| Secondary button | 8.18:1 | AAA |
| Muted text | 8.10:1 | AAA |
| Accent | 8.22:1 | AAA |
| Destructive | 5.95:1 | AA |
| Text on background | 19.56:1 | AAA |
| Text on card | 19.56:1 | AAA |
| Primary button | 8.20:1 | AAA |
| Secondary button | 8.18:1 | AAA |
| Muted text | 8.24:1 | AAA |
| Accent | 8.22:1 | AAA |
| Destructive | 3.80:1 | AA Large |
Paste this into your globals.css to use Rich in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.138 0.035 304.429);
--muted: oklch(0.94 0.007 283.837);
--muted-foreground: oklch(0.39 0.034 282.316);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.138 0.035 304.429);
--card: oklch(1 0 180);
--card-foreground: oklch(0.138 0.035 304.429);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.266 0.006 306.143);
--primary-foreground: oklch(0.801 0.008 306.308);
--secondary: oklch(0.265 0.005 283.615);
--secondary-foreground: oklch(0.799 0.007 283.824);
--accent: oklch(0.268 0.007 324.28);
--accent-foreground: oklch(0.803 0.009 324.194);
--destructive: oklch(0.527 0.21 29.228);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.266 0.006 306.143);
--chart-1: oklch(0.266 0.006 306.143);
--chart-2: oklch(0.265 0.005 283.615);
--chart-3: oklch(0.268 0.007 324.28);
--chart-4: oklch(0.295 0.006 283.598);
--chart-5: oklch(0.263 0.01 305.923);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.106 0.016 307.355);
--foreground: oklch(0.983 0.003 306.395);
--muted: oklch(0.172 0.011 282.772);
--muted-foreground: oklch(0.74 0.029 283.265);
--popover: oklch(0.106 0.016 307.355);
--popover-foreground: oklch(0.983 0.003 306.395);
--card: oklch(0.106 0.016 307.355);
--card-foreground: oklch(0.983 0.003 306.395);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.266 0.006 306.143);
--primary-foreground: oklch(0.801 0.008 306.308);
--secondary: oklch(0.265 0.005 283.615);
--secondary-foreground: oklch(0.799 0.007 283.824);
--accent: oklch(0.268 0.007 324.28);
--accent-foreground: oklch(0.803 0.009 324.194);
--destructive: oklch(0.636 0.225 27.804);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.266 0.006 306.143);
--chart-1: oklch(0.266 0.006 306.143);
--chart-2: oklch(0.265 0.005 283.615);
--chart-3: oklch(0.268 0.007 324.28);
--chart-4: oklch(0.295 0.006 283.598);
--chart-5: oklch(0.263 0.01 305.923);
}