Useful is a shadcn/ui theme built around a neutral gray primary color (#7c7979) with neutral gray accents (#7c7a79). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the neutral gray primary (#7c7979) on a red-tinted background (#0e0707).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfcsnow | #0e0707black |
| Foreground | #000000black | #ffffffwhite |
| Card | #fcf8f8snow | #110809black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fcf8f8snow | #110809black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #7c7979gray | #7c7979gray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #7c797bgray | #7c797bgray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #f6eff3whitesmoke | #10090dblack |
| Muted foreground | #453b41darkslategray | #c4bac0silver |
| Accent | #7c7a79gray | #7c7a79gray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #b13302firebrick | #ed4502orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7c7979gray | #7c7979gray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.45:1 | AAA |
| Text on card | 19.92:1 | AAA |
| Primary button | 4.30:1 | AA Large |
| Secondary button | 4.30:1 | AA Large |
| Muted text | 9.47:1 | AAA |
| Accent | 4.26:1 | AA Large |
| Destructive | 6.28:1 | AA |
| Text on background | 20.00:1 | AAA |
| Text on card | 19.74:1 | AAA |
| Primary button | 4.30:1 | AA Large |
| Secondary button | 4.30:1 | AA Large |
| Muted text | 10.41:1 | AAA |
| Accent | 4.26:1 | AA Large |
| Destructive | 3.84:1 | AA Large |
Paste this into your globals.css to use Useful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 11.292);
--foreground: oklch(0 0 0);
--muted: oklch(0.958 0.009 341.241);
--muted-foreground: oklch(0.364 0.017 342.083);
--popover: oklch(0.982 0.004 11.335);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.982 0.004 11.335);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.579 0.003 11.363);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.579 0.004 341.16);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.581 0.002 58.306);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.508 0.169 37.02);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.579 0.003 11.363);
--chart-1: oklch(0.579 0.003 11.363);
--chart-2: oklch(0.579 0.004 341.16);
--chart-3: oklch(0.581 0.002 58.306);
--chart-4: oklch(0.605 0.004 341.155);
--chart-5: oklch(0.573 0.012 11.714);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.137 0.014 12.614);
--foreground: oklch(1 0 180);
--muted: oklch(0.153 0.015 343.129);
--muted-foreground: oklch(0.8 0.014 341.419);
--popover: oklch(0.149 0.017 13.337);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.149 0.017 13.337);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.579 0.003 11.363);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.579 0.004 341.16);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.581 0.002 58.306);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.63 0.213 36.375);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.579 0.003 11.363);
--chart-1: oklch(0.579 0.003 11.363);
--chart-2: oklch(0.579 0.004 341.16);
--chart-3: oklch(0.581 0.002 58.306);
--chart-4: oklch(0.605 0.004 341.155);
--chart-5: oklch(0.573 0.012 11.714);
}