Function is a shadcn/ui theme built around a deep red primary color (#2d1a16) with deep indigo accents (#1a162d). The light mode uses a neutral background (#fdf8f7). Dark mode keeps the deep red primary (#2d1a16) on a red-tinted background (#0b0504).
| Token | Light | Dark |
|---|---|---|
| Background | #fdf8f7snow | #0b0504black |
| Foreground | #000000black | #fdfcfcsnow |
| Card | #fcf5f3seashell | #0f0705black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fcf5f3seashell | #0f0705black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #2d1a16black | #2d1a16black |
| Primary foreground | #d2aca2tan | #d2aca2tan |
| Secondary | #162d1ablack | #162d1ablack |
| Secondary foreground | #a2d2acsilver | #a2d2acsilver |
| Muted | #e8eee9linen | #111713black |
| Muted foreground | #3d5241darkslategray | #adc2b1silver |
| Accent | #1a162dblack | #1a162dblack |
| Accent foreground | #aca2d2lightsteelblue | #aca2d2lightsteelblue |
| Destructive | #d64e05chocolate | #ea5606orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2d1a16black | #2d1a16black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.95:1 | AAA |
| Text on card | 19.45:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 8.69:1 | AAA |
| Muted text | 7.16:1 | AAA |
| Accent | 7.41:1 | AAA |
| Destructive | 4.23:1 | AA Large |
| Text on background | 19.71:1 | AAA |
| Text on card | 19.91:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 8.69:1 | AAA |
| Muted text | 9.59:1 | AAA |
| Accent | 7.41:1 | AAA |
| Destructive | 3.61:1 | AA Large |
Paste this into your globals.css to use Function in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.005 34.308);
--foreground: oklch(0 0 0);
--muted: oklch(0.942 0.009 151.859);
--muted-foreground: oklch(0.416 0.039 150.503);
--popover: oklch(0.974 0.008 34.304);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.974 0.008 34.304);
--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.242 0.031 34.68);
--primary-foreground: oklch(0.775 0.047 34.365);
--secondary: oklch(0.271 0.045 149.088);
--secondary-foreground: oklch(0.82 0.074 150.563);
--accent: oklch(0.217 0.045 291.39);
--accent-foreground: oklch(0.737 0.07 293.794);
--destructive: oklch(0.602 0.183 41.019);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.242 0.031 34.68);
--chart-1: oklch(0.242 0.031 34.68);
--chart-2: oklch(0.271 0.045 149.088);
--chart-3: oklch(0.217 0.045 291.39);
--chart-4: oklch(0.307 0.054 148.923);
--chart-5: oklch(0.242 0.034 34.746);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.014 39.681);
--foreground: oklch(0.992 0.002 34.314);
--muted: oklch(0.198 0.013 150.94);
--muted-foreground: oklch(0.794 0.033 151.357);
--popover: oklch(0.141 0.016 38.432);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.141 0.016 38.432);
--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.242 0.031 34.68);
--primary-foreground: oklch(0.775 0.047 34.365);
--secondary: oklch(0.271 0.045 149.088);
--secondary-foreground: oklch(0.82 0.074 150.563);
--accent: oklch(0.217 0.045 291.39);
--accent-foreground: oklch(0.737 0.07 293.794);
--destructive: oklch(0.643 0.196 40.828);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.242 0.031 34.68);
--chart-1: oklch(0.242 0.031 34.68);
--chart-2: oklch(0.271 0.045 149.088);
--chart-3: oklch(0.217 0.045 291.39);
--chart-4: oklch(0.307 0.054 148.923);
--chart-5: oklch(0.242 0.034 34.746);
}