Fanlight is a shadcn/ui theme built around a green primary color (#58d076) with teal accents (#58d0b2). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#58d076) on a neutral background (#020804).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020804black |
| Foreground | #000000black | #fcfdfcwhite |
| Card | #fcfcfcsnow | #040c06black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #ffffffwhite | #020804black |
| Popover foreground | #000000black | #fcfdfcwhite |
| Primary | #58d076mediumseagreen | #58d076mediumseagreen |
| Primary foreground | #000000black | #000000black |
| Secondary | #76d058yellowgreen | #76d058yellowgreen |
| Secondary foreground | #000000black | #000000black |
| Muted | #ecf0ealinen | #10150fblack |
| Muted foreground | #3d4c38darkslategray | #b8c7b3silver |
| Accent | #58d0b2mediumaquamarine | #58d0b2mediumaquamarine |
| Accent foreground | #000000black | #000000black |
| Destructive | #e21603red | #fc4231tomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #58d076mediumseagreen | #58d076mediumseagreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 10.68:1 | AAA |
| Secondary button | 10.92:1 | AAA |
| Muted text | 7.96:1 | AAA |
| Accent | 11.06:1 | AAA |
| Destructive | 4.82:1 | AA |
| Text on background | 19.83:1 | AAA |
| Text on card | 19.84:1 | AAA |
| Primary button | 10.68:1 | AAA |
| Secondary button | 10.92:1 | AAA |
| Muted text | 10.44:1 | AAA |
| Accent | 11.06:1 | AAA |
| Destructive | 3.52:1 | AA Large |
Paste this into your globals.css to use Fanlight in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.951 0.009 137.78);
--muted-foreground: oklch(0.398 0.038 137.95);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--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.767 0.167 149.126);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.775 0.179 138.587);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.781 0.117 174.003);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.579 0.23 30.047);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.767 0.167 149.126);
--chart-1: oklch(0.767 0.167 149.126);
--chart-2: oklch(0.775 0.179 138.587);
--chart-3: oklch(0.781 0.117 174.003);
--chart-4: oklch(0.789 0.168 138.446);
--chart-5: oklch(0.774 0.174 148.893);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.018 153.26);
--foreground: oklch(0.993 0.001 153.862);
--muted: oklch(0.188 0.014 137.902);
--muted-foreground: oklch(0.812 0.032 137.832);
--popover: oklch(0.122 0.018 153.26);
--popover-foreground: oklch(0.993 0.001 153.862);
--card: oklch(0.14 0.021 153.162);
--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.767 0.167 149.126);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.775 0.179 138.587);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.781 0.117 174.003);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.655 0.224 29.617);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.767 0.167 149.126);
--chart-1: oklch(0.767 0.167 149.126);
--chart-2: oklch(0.775 0.179 138.587);
--chart-3: oklch(0.781 0.117 174.003);
--chart-4: oklch(0.789 0.168 138.446);
--chart-5: oklch(0.774 0.174 148.893);
}