Quartz for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button6.76:1AA
Secondary button8.70:1AAA
Muted text7.69:1AAA
Accent8.70:1AAA
Destructive6.77:1AA
Dark mode
Text on background19.99:1AAA
Text on card19.99:1AAA
Primary button6.76:1AA
Secondary button8.70:1AAA
Muted text9.30:1AAA
Accent8.70:1AAA
Destructive4.05:1AA Large

CSS variables

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);
}