Carnation is a shadcn/ui theme built around an indigo primary color (#4334a2) with green accents (#34a243). The light mode uses a neutral background (#ffffff). Dark mode keeps the indigo primary (#4334a2) on an indigo-tinted background (#07060e).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #07060eblack |
| Foreground | #050311black | #f9f8fcghostwhite |
| Card | #fcfcfcsnow | #090812black |
| Card foreground | #04020dblack | #fcfcfdwhite |
| Popover | #fcfcfcsnow | #090812black |
| Popover foreground | #04020dblack | #fcfcfdwhite |
| Primary | #4334a2darkslateblue | #4334a2darkslateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #a24334sienna | #a24334sienna |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #ecdcdagainsboro | #251513black |
| Muted foreground | #544c4adarkslategray | #b5acabdarkgray |
| Accent | #34a243seagreen | #34a243seagreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #da3107orangered | #f8542atomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4334a2darkslateblue | #4334a2darkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.43:1 | AAA |
| Text on card | 20.15:1 | AAA |
| Primary button | 9.29:1 | AAA |
| Secondary button | 6.20:1 | AA |
| Muted text | 6.31:1 | AA |
| Accent | 3.29:1 | AA Large |
| Destructive | 4.75:1 | AA |
| Text on background | 19.03:1 | AAA |
| Text on card | 19.42:1 | AAA |
| Primary button | 9.29:1 | AAA |
| Secondary button | 6.20:1 | AA |
| Muted text | 7.88:1 | AAA |
| Accent | 3.29:1 | AA Large |
| Destructive | 6.29:1 | AA |
Paste this into your globals.css to use Carnation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.116 0.036 288.426);
--muted: oklch(0.907 0.018 28.044);
--muted-foreground: oklch(0.423 0.011 28.088);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.104 0.031 289.336);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.104 0.031 289.336);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.414 0.168 282.225);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.507 0.129 30.875);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.629 0.166 145.426);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.579 0.209 33.212);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.414 0.168 282.225);
--chart-1: oklch(0.414 0.168 282.225);
--chart-2: oklch(0.507 0.129 30.875);
--chart-3: oklch(0.629 0.166 145.426);
--chart-4: oklch(0.532 0.136 30.899);
--chart-5: oklch(0.41 0.176 281.304);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.131 0.018 290.833);
--foreground: oklch(0.981 0.005 292.45);
--muted: oklch(0.218 0.027 29.058);
--muted-foreground: oklch(0.752 0.01 28.001);
--popover: oklch(0.141 0.021 290.006);
--popover-foreground: oklch(0.99 0.002 292.497);
--card: oklch(0.141 0.021 290.006);
--card-foreground: oklch(0.99 0.002 292.497);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.414 0.168 282.225);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.507 0.129 30.875);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.629 0.166 145.426);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.665 0.208 34.782);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.414 0.168 282.225);
--chart-1: oklch(0.414 0.168 282.225);
--chart-2: oklch(0.507 0.129 30.875);
--chart-3: oklch(0.629 0.166 145.426);
--chart-4: oklch(0.532 0.136 30.899);
--chart-5: oklch(0.41 0.176 281.304);
}