Utility is a shadcn/ui theme built around a deep green primary color (#17180c) with deep indigo accents (#0d0c18). The light mode uses a neutral background (#fdfdf6). Dark mode keeps the deep green primary (#17180c) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdf6snow | #000000black |
| Foreground | #0f1004black | #fafaf4floralwhite |
| Card | #fdfdf6snow | #000000black |
| Card foreground | #0f1004black | #fafaf4floralwhite |
| Popover | #fdfdf6snow | #000000black |
| Popover foreground | #0f1004black | #fafaf4floralwhite |
| Primary | #17180cblack | #17180cblack |
| Primary foreground | #999f50darkkhaki | #999f50darkkhaki |
| Secondary | #0d0c18black | #0d0c18black |
| Secondary foreground | #948fc7mediumpurple | #948fc7mediumpurple |
| Muted | #d5d4e8gainsboro | #19172bblack |
| Muted foreground | #62616bdimgray | #95949edarkgray |
| Accent | #0d0c18black | #0d0c18black |
| Accent foreground | #948fc7mediumpurple | #948fc7mediumpurple |
| Destructive | #8f2505saddlebrown | #f13f09orangered |
| Destructive foreground | #fdd5c9bisque | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #17180cblack | #17180cblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.79:1 | AAA |
| Text on card | 18.79:1 | AAA |
| Primary button | 6.35:1 | AA |
| Secondary button | 6.47:1 | AA |
| Muted text | 4.17:1 | AA Large |
| Accent | 6.47:1 | AA |
| Destructive | 6.38:1 | AA |
| Text on background | 20.04:1 | AAA |
| Text on card | 20.04:1 | AAA |
| Primary button | 6.35:1 | AA |
| Secondary button | 6.47:1 | AA |
| Muted text | 5.85:1 | AA |
| Accent | 6.47:1 | AA |
| Destructive | 3.84:1 | AA Large |
Paste this into your globals.css to use Utility in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.009 110.418);
--foreground: oklch(0.167 0.024 112.458);
--muted: oklch(0.876 0.028 289.635);
--muted-foreground: oklch(0.497 0.016 289.629);
--popover: oklch(0.993 0.009 110.418);
--popover-foreground: oklch(0.167 0.024 112.458);
--card: oklch(0.993 0.009 110.418);
--card-foreground: oklch(0.167 0.024 112.458);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.203 0.022 112.22);
--primary-foreground: oklch(0.681 0.103 113.055);
--secondary: oklch(0.162 0.025 287.124);
--secondary-foreground: oklch(0.675 0.081 287.822);
--accent: oklch(0.162 0.025 287.124);
--accent-foreground: oklch(0.675 0.081 287.822);
--destructive: oklch(0.432 0.146 35.351);
--destructive-foreground: oklch(0.904 0.048 37.596);
--ring: oklch(0.203 0.022 112.22);
--chart-1: oklch(0.203 0.022 112.22);
--chart-2: oklch(0.162 0.025 287.124);
--chart-3: oklch(0.162 0.025 287.124);
--chart-4: oklch(0.189 0.034 286.512);
--chart-5: oklch(0.205 0.024 112.361);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.984 0.008 110.392);
--muted: oklch(0.217 0.04 286.401);
--muted-foreground: oklch(0.67 0.015 289.825);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.984 0.008 110.392);
--card: oklch(0 0 0);
--card-foreground: oklch(0.984 0.008 110.392);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.203 0.022 112.22);
--primary-foreground: oklch(0.681 0.103 113.055);
--secondary: oklch(0.162 0.025 287.124);
--secondary-foreground: oklch(0.675 0.081 287.822);
--accent: oklch(0.162 0.025 287.124);
--accent-foreground: oklch(0.675 0.081 287.822);
--destructive: oklch(0.632 0.221 34.53);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.203 0.022 112.22);
--chart-1: oklch(0.203 0.022 112.22);
--chart-2: oklch(0.162 0.025 287.124);
--chart-3: oklch(0.162 0.025 287.124);
--chart-4: oklch(0.189 0.034 286.512);
--chart-5: oklch(0.205 0.024 112.361);
}