Functional is a shadcn/ui theme built around a muted purple primary color (#bfb5c0) with muted teal accents (#b5c0bf). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#bfb5c0) on a purple-tinted background (#0d070d).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0d070dblack |
| Foreground | #0c030cblack | #ffffffwhite |
| Card | #ffffffwhite | #0d070dblack |
| Card foreground | #0c030cblack | #ffffffwhite |
| Popover | #ffffffwhite | #0d070dblack |
| Popover foreground | #0c030cblack | #ffffffwhite |
| Primary | #bfb5c0silver | #bfb5c0silver |
| Primary foreground | #241e24black | #241e24black |
| Secondary | #c0bfb5silver | #c0bfb5silver |
| Secondary foreground | #24241eblack | #24241eblack |
| Muted | #eae9d7antiquewhite | #282715black |
| Muted foreground | #54544fdarkslategray | #b0b0abdarkgray |
| Accent | #b5c0bfsilver | #b5c0bfsilver |
| Accent foreground | #1e2424black | #1e2424black |
| Destructive | #8d150cdarkred | #ec3022crimson |
| Destructive foreground | #fbd3d0pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #bfb5c0silver | #bfb5c0silver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.31:1 | AAA |
| Text on card | 20.31:1 | AAA |
| Primary button | 8.21:1 | AAA |
| Secondary button | 8.46:1 | AAA |
| Muted text | 6.21:1 | AA |
| Accent | 8.41:1 | AAA |
| Destructive | 6.84:1 | AA |
| Text on background | 19.92:1 | AAA |
| Text on card | 19.92:1 | AAA |
| Primary button | 8.21:1 | AAA |
| Secondary button | 8.46:1 | AAA |
| Muted text | 6.90:1 | AA |
| Accent | 8.41:1 | AAA |
| Destructive | 4.19:1 | AA Large |
Paste this into your globals.css to use Functional in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.123 0.033 326.854);
--muted: oklch(0.93 0.024 106.067);
--muted-foreground: oklch(0.444 0.008 105.922);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.123 0.033 326.854);
--card: oklch(1 0 180);
--card-foreground: oklch(0.123 0.033 326.854);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.784 0.02 325.272);
--primary-foreground: oklch(0.245 0.013 325.449);
--secondary: oklch(0.803 0.015 105.944);
--secondary-foreground: oklch(0.257 0.01 106.256);
--accent: oklch(0.798 0.012 195.709);
--accent-foreground: oklch(0.254 0.008 195.453);
--destructive: oklch(0.414 0.155 29.574);
--destructive-foreground: oklch(0.9 0.045 22.843);
--ring: oklch(0.784 0.02 325.272);
--chart-1: oklch(0.784 0.02 325.272);
--chart-2: oklch(0.803 0.015 105.944);
--chart-3: oklch(0.798 0.012 195.709);
--chart-4: oklch(0.826 0.013 105.899);
--chart-5: oklch(0.782 0.027 325.336);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.141 0.018 325.982);
--foreground: oklch(1 0 180);
--muted: oklch(0.27 0.031 107.465);
--muted-foreground: oklch(0.755 0.007 105.776);
--popover: oklch(0.141 0.018 325.982);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.141 0.018 325.982);
--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.784 0.02 325.272);
--primary-foreground: oklch(0.245 0.013 325.449);
--secondary: oklch(0.803 0.015 105.944);
--secondary-foreground: oklch(0.257 0.01 106.256);
--accent: oklch(0.798 0.012 195.709);
--accent-foreground: oklch(0.254 0.008 195.453);
--destructive: oklch(0.612 0.224 29.414);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.784 0.02 325.272);
--chart-1: oklch(0.784 0.02 325.272);
--chart-2: oklch(0.803 0.015 105.944);
--chart-3: oklch(0.798 0.012 195.709);
--chart-4: oklch(0.826 0.013 105.899);
--chart-5: oklch(0.782 0.027 325.336);
}