Quartz is a shadcn/ui theme built around a near-black primary color (#060404) with near-black accents (#040606). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#060404) on a red-tinted background (#0e0707).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0e0707black |
| Foreground | #000000black | #ffffffwhite |
| Card | #ffffffwhite | #0e0707black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #ffffffwhite | #0e0707black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #060404black | #060404black |
| Primary foreground | #b18b8drosybrown | #b18b8drosybrown |
| Secondary | #040606black | #040606black |
| Secondary foreground | #8bb1afdarkgray | #8bb1afdarkgray |
| Muted | #e3ededlavender | #121c1cblack |
| Muted foreground | #3f4a4adarkslategray | #b5c0bfsilver |
| Accent | #040606black | #040606black |
| Accent foreground | #8bb1afdarkgray | #8bb1afdarkgray |
| Destructive | #aa2e09firebrick | #e9400corangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #060404black | #060404black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 6.76:1 | AA |
| Secondary button | 8.70:1 | AAA |
| Muted text | 7.69:1 | AAA |
| Accent | 8.70:1 | AAA |
| Destructive | 6.77:1 | AA |
| Text on background | 19.99:1 | AAA |
| Text on card | 19.99:1 | AAA |
| Primary button | 6.76:1 | AA |
| Secondary button | 8.70:1 | AAA |
| Muted text | 9.30:1 | AAA |
| Accent | 8.70:1 | AAA |
| Destructive | 4.05:1 | AA Large |
Paste this into your globals.css to use Quartz in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.939 0.011 192.176);
--muted-foreground: oklch(0.4 0.014 191.683);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--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.112 0.006 12.971);
--primary-foreground: oklch(0.673 0.047 13.929);
--secondary: oklch(0.119 0.005 191.997);
--secondary-foreground: oklch(0.733 0.042 191.219);
--accent: oklch(0.119 0.005 191.997);
--accent-foreground: oklch(0.733 0.042 191.219);
--destructive: oklch(0.49 0.165 35.275);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.112 0.006 12.971);
--chart-1: oklch(0.112 0.006 12.971);
--chart-2: oklch(0.119 0.005 191.997);
--chart-3: oklch(0.119 0.005 191.997);
--chart-4: oklch(0.164 0.008 191.388);
--chart-5: oklch(0.111 0.007 13.066);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.138 0.014 13.832);
--foreground: oklch(1 0 180);
--muted: oklch(0.217 0.015 190.935);
--muted-foreground: oklch(0.798 0.012 192.107);
--popover: oklch(0.138 0.014 13.832);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.138 0.014 13.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.112 0.006 12.971);
--primary-foreground: oklch(0.673 0.047 13.929);
--secondary: oklch(0.119 0.005 191.997);
--secondary-foreground: oklch(0.733 0.042 191.219);
--accent: oklch(0.119 0.005 191.997);
--accent-foreground: oklch(0.733 0.042 191.219);
--destructive: oklch(0.618 0.212 34.9);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.112 0.006 12.971);
--chart-1: oklch(0.112 0.006 12.971);
--chart-2: oklch(0.119 0.005 191.997);
--chart-3: oklch(0.119 0.005 191.997);
--chart-4: oklch(0.164 0.008 191.388);
--chart-5: oklch(0.111 0.007 13.066);
}