2 is a shadcn/ui theme built around a vivid indigo primary color (#6d45f2) with muted light indigo accents (#b9b2d2). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid indigo primary (#6d45f2) on a neutral background (#020104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020104black |
| Foreground | #080316black | #ffffffwhite |
| Card | #fcfcfcsnow | #040307black |
| Card foreground | #060312black | #ffffffwhite |
| Popover | #ffffffwhite | #020104black |
| Popover foreground | #080316black | #ffffffwhite |
| Primary | #6d45f2mediumslateblue | #6d45f2mediumslateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #d3d0ddlightgrey | #2f2d34darkslategray |
| Secondary foreground | #383347darkslategray | #c7c6cdsilver |
| Muted | #ddd8eegainsboro | #161127black |
| Muted foreground | #474450darkslategray | #b2afbbdarkgray |
| Accent | #b9b2d2lightsteelblue | #3d384ddarkslategray |
| Accent foreground | #231e33darkslategray | #d8d6e1gainsboro |
| Destructive | #d00606red | #e90707red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #eae9edlavender | #1f1e24black |
| Input | #eae9edlavender | #1f1e24black |
| Ring | #6d45f2mediumslateblue | #6d45f2mediumslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.29:1 | AAA |
| Text on card | 19.95:1 | AAA |
| Primary button | 5.54:1 | AA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 6.84:1 | AA |
| Accent | 7.93:1 | AAA |
| Destructive | 5.66:1 | AA |
| Text on background | 20.78:1 | AAA |
| Text on card | 20.56:1 | AAA |
| Primary button | 5.54:1 | AA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 8.51:1 | AAA |
| Accent | 7.85:1 | AAA |
| Destructive | 4.68:1 | AA |
Paste this into your globals.css to use 2 in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.126 0.044 292.946);
--muted: oklch(0.893 0.03 296.469);
--muted-foreground: oklch(0.394 0.02 296.157);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.126 0.044 292.946);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.116 0.039 294.485);
--border: oklch(0.935 0.006 296.973);
--input: oklch(0.935 0.006 296.973);
--primary: oklch(0.545 0.242 285.904);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.863 0.018 296.701);
--secondary-foreground: oklch(0.336 0.034 295.181);
--accent: oklch(0.78 0.045 296.02);
--accent-foreground: oklch(0.252 0.04 294.067);
--destructive: oklch(0.54 0.219 28.983);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.545 0.242 285.904);
--chart-1: oklch(0.545 0.242 285.904);
--chart-2: oklch(0.863 0.018 296.701);
--chart-3: oklch(0.78 0.045 296.02);
--chart-4: oklch(0.889 0.015 296.783);
--chart-5: oklch(0.542 0.248 285.32);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.082 0.012 296.705);
--foreground: oklch(1 0 180);
--muted: oklch(0.197 0.043 292.731);
--muted-foreground: oklch(0.76 0.017 296.677);
--popover: oklch(0.082 0.012 296.705);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.103 0.015 296.705);
--card-foreground: oklch(1 0 180);
--border: oklch(0.239 0.013 296.113);
--input: oklch(0.239 0.013 296.113);
--primary: oklch(0.545 0.242 285.904);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.302 0.012 296.344);
--secondary-foreground: oklch(0.829 0.011 296.851);
--accent: oklch(0.354 0.037 295.15);
--accent-foreground: oklch(0.88 0.016 296.756);
--destructive: oklch(0.587 0.239 29.016);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.545 0.242 285.904);
--chart-1: oklch(0.545 0.242 285.904);
--chart-2: oklch(0.302 0.012 296.344);
--chart-3: oklch(0.354 0.037 295.15);
--chart-4: oklch(0.331 0.014 296.319);
--chart-5: oklch(0.542 0.248 285.32);
}