First is a shadcn/ui theme built around a violet primary color (#7144ca) with green accents (#44ca71). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#7144ca) on a violet-tinted background (#09070e).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #09070eblack |
| Foreground | #040208black | #fcfcfdwhite |
| Card | #ffffffwhite | #09070eblack |
| Card foreground | #040208black | #fcfcfdwhite |
| Popover | #ffffffwhite | #09070eblack |
| Popover foreground | #040208black | #fcfcfdwhite |
| Primary | #7144caslateblue | #7144caslateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #ca7144peru | #ca7144peru |
| Secondary foreground | #000000black | #000000black |
| Muted | #f4ebe6linen | #19100bblack |
| Muted foreground | #6c605adimgray | #a59993rosybrown |
| Accent | #44ca71mediumseagreen | #44ca71mediumseagreen |
| Accent foreground | #0f341bdarkgreen | #0f341bdarkgreen |
| Destructive | #6e0d08maroon | #ee1c11red |
| Destructive foreground | #f9b2aelightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7144caslateblue | #7144caslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.64:1 | AAA |
| Text on card | 20.64:1 | AAA |
| Primary button | 6.20:1 | AA |
| Secondary button | 5.95:1 | AA |
| Muted text | 5.16:1 | AA |
| Accent | 6.51:1 | AA |
| Destructive | 6.98:1 | AA |
| Text on background | 19.55:1 | AAA |
| Text on card | 19.55:1 | AAA |
| Primary button | 6.20:1 | AA |
| Secondary button | 5.95:1 | AA |
| Muted text | 6.78:1 | AA |
| Accent | 6.51:1 | AA |
| Destructive | 4.35:1 | AA Large |
Paste this into your globals.css to use First in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.101 0.02 301.995);
--muted: oklch(0.946 0.012 48.603);
--muted-foreground: oklch(0.5 0.018 48.34);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.101 0.02 301.995);
--card: oklch(1 0 180);
--card-foreground: oklch(0.101 0.02 301.995);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.513 0.197 293.586);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.64 0.128 46.094);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.746 0.172 150.726);
--accent-foreground: oklch(0.29 0.062 151.484);
--destructive: oklch(0.346 0.13 29.179);
--destructive-foreground: oklch(0.829 0.084 22.426);
--ring: oklch(0.513 0.197 293.586);
--chart-1: oklch(0.513 0.197 293.586);
--chart-2: oklch(0.64 0.128 46.094);
--chart-3: oklch(0.746 0.172 150.726);
--chart-4: oklch(0.661 0.119 46.54);
--chart-5: oklch(0.51 0.205 292.963);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.135 0.016 300.94);
--foreground: oklch(0.991 0.002 301.462);
--muted: oklch(0.182 0.018 47.715);
--muted-foreground: oklch(0.69 0.017 48.469);
--popover: oklch(0.135 0.016 300.94);
--popover-foreground: oklch(0.991 0.002 301.462);
--card: oklch(0.135 0.016 300.94);
--card-foreground: oklch(0.991 0.002 301.462);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.513 0.197 293.586);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.64 0.128 46.094);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.746 0.172 150.726);
--accent-foreground: oklch(0.29 0.062 151.484);
--destructive: oklch(0.604 0.237 29.439);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.513 0.197 293.586);
--chart-1: oklch(0.513 0.197 293.586);
--chart-2: oklch(0.64 0.128 46.094);
--chart-3: oklch(0.746 0.172 150.726);
--chart-4: oklch(0.661 0.119 46.54);
--chart-5: oklch(0.51 0.205 292.963);
}