Caviar is a shadcn/ui theme built around a near-white primary color (#faffff) with near-white accents (#fafcff). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#faffff) on a neutral background (#020303).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020303black |
| Foreground | #020808black | #ffffffwhite |
| Card | #ffffffwhite | #020303black |
| Card foreground | #020808black | #ffffffwhite |
| Popover | #ffffffwhite | #020303black |
| Popover foreground | #020808black | #ffffffwhite |
| Primary | #faffffwhite | #faffffwhite |
| Primary foreground | #04585ddarkslategray | #04585ddarkslategray |
| Secondary | #fafffdwhite | #fafffdwhite |
| Secondary foreground | #045d35darkslategray | #045d35darkslategray |
| Muted | #e6efeblavender | #101915black |
| Muted foreground | #3e4643darkslategray | #b9c1bdsilver |
| Accent | #fafcffghostwhite | #fafcffghostwhite |
| Accent foreground | #095aberoyalblue | #095aberoyalblue |
| Destructive | #810e0emaroon | #e92b2bcrimson |
| Destructive foreground | #f9c8c8pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #faffffwhite | #faffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.17:1 | AAA |
| Text on card | 20.17:1 | AAA |
| Primary button | 8.11:1 | AAA |
| Secondary button | 7.91:1 | AAA |
| Muted text | 8.28:1 | AAA |
| Accent | 6.35:1 | AA |
| Destructive | 7.04:1 | AAA |
| Text on background | 20.62:1 | AAA |
| Text on card | 20.62:1 | AAA |
| Primary button | 8.11:1 | AAA |
| Secondary button | 7.91:1 | AAA |
| Muted text | 9.77:1 | AAA |
| Accent | 6.35:1 | AA |
| Destructive | 4.34:1 | AA Large |
Paste this into your globals.css to use Caviar in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.125 0.015 198.571);
--muted: oklch(0.944 0.01 167.504);
--muted-foreground: oklch(0.387 0.012 166.928);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.125 0.015 198.571);
--card: oklch(1 0 180);
--card-foreground: oklch(0.125 0.015 198.571);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.995 0.005 200.832);
--primary-foreground: oklch(0.42 0.07 200.846);
--secondary: oklch(0.995 0.006 167.657);
--secondary-foreground: oklch(0.42 0.1 155.973);
--accent: oklch(0.991 0.004 253.247);
--accent-foreground: oklch(0.487 0.172 257.712);
--destructive: oklch(0.387 0.148 27.822);
--destructive-foreground: oklch(0.875 0.057 18.29);
--ring: oklch(0.995 0.005 200.832);
--chart-1: oklch(0.995 0.005 200.832);
--chart-2: oklch(0.995 0.006 167.657);
--chart-3: oklch(0.991 0.004 253.247);
--chart-4: oklch(1.01 0.011 348.115);
--chart-5: oklch(0.995 0.005 200.83);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.096 0.006 199.514);
--foreground: oklch(1 0 180);
--muted: oklch(0.202 0.015 165.59);
--muted-foreground: oklch(0.803 0.01 167.462);
--popover: oklch(0.096 0.006 199.514);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.096 0.006 199.514);
--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.995 0.005 200.832);
--primary-foreground: oklch(0.42 0.07 200.846);
--secondary: oklch(0.995 0.006 167.657);
--secondary-foreground: oklch(0.42 0.1 155.973);
--accent: oklch(0.991 0.004 253.247);
--accent-foreground: oklch(0.487 0.172 257.712);
--destructive: oklch(0.603 0.223 27.19);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.995 0.005 200.832);
--chart-1: oklch(0.995 0.005 200.832);
--chart-2: oklch(0.995 0.006 167.657);
--chart-3: oklch(0.991 0.004 253.247);
--chart-4: oklch(1.01 0.011 348.115);
--chart-5: oklch(0.995 0.005 200.83);
}