Faint is a shadcn/ui theme built around a violet primary color (#8c6ccb) with muted violet accents (#b9b3c7). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the violet primary (#8c6ccb) on a violet-tinted background (#07050b).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfcfdwhite | #07050bblack |
| Foreground | #040109black | #ffffffwhite |
| Card | #f9f8fcghostwhite | #09060eblack |
| Card foreground | #020105black | #ffffffwhite |
| Popover | #f9f8fcghostwhite | #09060eblack |
| Popover foreground | #020105black | #ffffffwhite |
| Primary | #8c6ccbmediumpurple | #8c6ccbmediumpurple |
| Primary foreground | #000000black | #000000black |
| Secondary | #d5d2dalightgrey | #30293ddarkslategray |
| Secondary foreground | #3b3743darkslategray | #c9c2d6thistle |
| Muted | #f2f1f3whitesmoke | #0c0c0eblack |
| Muted foreground | #433f4bdarkslategray | #b8b4c0silver |
| Accent | #b9b3c7silver | #40335cdarkslategray |
| Accent foreground | #221e29black | #ddd8e9gainsboro |
| Destructive | #b70e0bfirebrick | #f33330crimson |
| Destructive foreground | #fef6f5lavenderblush | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8c6ccbmediumpurple | #8c6ccbmediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.15:1 | AAA |
| Text on card | 19.68:1 | AAA |
| Primary button | 5.11:1 | AA |
| Secondary button | 7.75:1 | AAA |
| Muted text | 9.09:1 | AAA |
| Accent | 8.02:1 | AAA |
| Destructive | 6.39:1 | AA |
| Text on background | 20.32:1 | AAA |
| Text on card | 20.10:1 | AAA |
| Primary button | 5.11:1 | AA |
| Secondary button | 8.08:1 | AAA |
| Muted text | 9.62:1 | AAA |
| Accent | 8.17:1 | AAA |
| Destructive | 3.94:1 | AA Large |
Paste this into your globals.css to use Faint in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 301.451);
--foreground: oklch(0.092 0.031 302.358);
--muted: oklch(0.96 0.003 301.44);
--muted-foreground: oklch(0.375 0.022 300.566);
--popover: oklch(0.981 0.005 301.408);
--popover-foreground: oklch(0.073 0.025 302.358);
--card: oklch(0.981 0.005 301.408);
--card-foreground: oklch(0.073 0.025 302.358);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.604 0.143 297.308);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.869 0.011 301.28);
--secondary-foreground: oklch(0.346 0.022 300.479);
--accent: oklch(0.778 0.029 300.896);
--accent-foreground: oklch(0.245 0.021 300.123);
--destructive: oklch(0.494 0.197 28.903);
--destructive-foreground: oklch(0.979 0.01 18.512);
--ring: oklch(0.604 0.143 297.308);
--chart-1: oklch(0.604 0.143 297.308);
--chart-2: oklch(0.869 0.011 301.28);
--chart-3: oklch(0.778 0.029 300.896);
--chart-4: oklch(0.894 0.009 301.326);
--chart-5: oklch(0.599 0.152 296.969);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.12 0.017 301.814);
--foreground: oklch(1 0 180);
--muted: oklch(0.154 0.005 300.974);
--muted-foreground: oklch(0.777 0.018 301.121);
--popover: oklch(0.132 0.02 300.832);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.132 0.02 300.832);
--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.604 0.143 297.308);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.297 0.037 299.414);
--secondary-foreground: oklch(0.825 0.029 300.925);
--accent: oklch(0.355 0.072 298.022);
--accent-foreground: oklch(0.891 0.025 301.044);
--destructive: oklch(0.627 0.227 27.442);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.604 0.143 297.308);
--chart-1: oklch(0.604 0.143 297.308);
--chart-2: oklch(0.297 0.037 299.414);
--chart-3: oklch(0.355 0.072 298.022);
--chart-4: oklch(0.324 0.042 299.345);
--chart-5: oklch(0.599 0.152 296.969);
}