Rare is a shadcn/ui theme built around a vivid deep teal primary color (#017a57) with vivid deep cyan accents (#01607a). The light mode uses a neutral background (#fbfefd). Dark mode keeps the vivid deep teal primary (#017a57) on a teal-tinted background (#050f0c).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefdwhite | #050f0cblack |
| Foreground | #03110dblack | #ffffffwhite |
| Card | #fbfefdwhite | #050f0cblack |
| Card foreground | #03110dblack | #ffffffwhite |
| Popover | #fbfefdwhite | #050f0cblack |
| Popover foreground | #03110dblack | #ffffffwhite |
| Primary | #017a57teal | #017a57teal |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #017a1bgreen | #017a1bgreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e3ede5gainsboro | #121c14black |
| Muted foreground | #405444darkslategray | #abbfafdarkgray |
| Accent | #01607ateal | #01607ateal |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #de4c02orangered | #fd6a21tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #017a57teal | #017a57teal |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.97:1 | AAA |
| Text on card | 18.97:1 | AAA |
| Primary button | 5.36:1 | AA |
| Secondary button | 5.54:1 | AA |
| Muted text | 6.82:1 | AA |
| Accent | 7.15:1 | AAA |
| Destructive | 4.09:1 | AA Large |
| Text on background | 19.39:1 | AAA |
| Text on card | 19.39:1 | AAA |
| Primary button | 5.36:1 | AA |
| Secondary button | 5.54:1 | AA |
| Muted text | 8.98:1 | AAA |
| Accent | 7.15:1 | AAA |
| Destructive | 7.25:1 | AAA |
Paste this into your globals.css to use Rare in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 177.619);
--foreground: oklch(0.163 0.024 174.691);
--muted: oklch(0.937 0.015 152.364);
--muted-foreground: oklch(0.425 0.037 151.158);
--popover: oklch(0.994 0.003 177.619);
--popover-foreground: oklch(0.163 0.024 174.691);
--card: oklch(0.994 0.003 177.619);
--card-foreground: oklch(0.163 0.024 174.691);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.513 0.107 165.182);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.503 0.16 144.56);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.453 0.086 224.913);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.612 0.194 39.384);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.513 0.107 165.182);
--chart-1: oklch(0.513 0.107 165.182);
--chart-2: oklch(0.503 0.16 144.56);
--chart-3: oklch(0.453 0.086 224.913);
--chart-4: oklch(0.547 0.175 144.428);
--chart-5: oklch(0.518 0.109 164.895);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.158 0.018 175.431);
--foreground: oklch(1 0 180);
--muted: oklch(0.214 0.021 150.925);
--muted-foreground: oklch(0.786 0.032 151.96);
--popover: oklch(0.158 0.018 175.431);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.158 0.018 175.431);
--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.513 0.107 165.182);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.503 0.16 144.56);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.453 0.086 224.913);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.699 0.195 42.578);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.513 0.107 165.182);
--chart-1: oklch(0.513 0.107 165.182);
--chart-2: oklch(0.503 0.16 144.56);
--chart-3: oklch(0.453 0.086 224.913);
--chart-4: oklch(0.547 0.175 144.428);
--chart-5: oklch(0.518 0.109 164.895);
}