Zinc for shadcn/ui

Zinc is a shadcn/ui theme built around a purple primary color (#d57cc3) with pink accents (#d57c97). The light mode uses a neutral background (#fefbfd). Dark mode keeps the purple primary (#d57cc3) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfdsnow
#000000black
Foreground
#160312black
#faf5f9whitesmoke
Card
#fdf7fcsnow
#030303black
Card foreground
#12030fblack
#fbf8fbsnow
Popover
#fdf7fcsnow
#030303black
Popover foreground
#12030fblack
#fbf8fbsnow
Primary
#d57cc3orchid
#d57cc3orchid
Primary foreground
#170714black
#170714black
Secondary
#ba7cd5orchid
#ba7cd5orchid
Secondary foreground
#120717black
#120717black
Muted
#eeecefwhitesmoke
#121013black
Muted foreground
#4a494bdarkslategray
#b5b4b6silver
Accent
#d57c97palevioletred
#d57c97palevioletred
Accent foreground
#17070cblack
#17070cblack
Destructive
#dd0e03red
#ec0f04red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d57cc3orchid
#d57cc3orchid

Contrast

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

Light mode
Text on background19.34:1AAA
Text on card18.98:1AAA
Primary button6.95:1AA
Secondary button6.48:1AA
Muted text7.59:1AAA
Accent6.66:1AA
Destructive5.07:1AA
Dark mode
Text on background19.49:1AAA
Text on card19.61:1AAA
Primary button6.95:1AA
Secondary button6.48:1AA
Muted text9.14:1AAA
Accent6.66:1AA
Destructive4.52:1AA

CSS variables

Paste this into your globals.css to use Zinc in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 332.076);
  --foreground: oklch(0.149 0.048 335.447);
  --muted: oklch(0.944 0.005 316.003);
  --muted-foreground: oklch(0.408 0.003 315.997);
  --popover: oklch(0.982 0.009 332.148);
  --popover-foreground: oklch(0.135 0.042 334.799);
  --card: oklch(0.982 0.009 332.148);
  --card-foreground: oklch(0.135 0.042 334.799);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.705 0.141 334.739);
  --primary-foreground: oklch(0.163 0.036 334.914);
  --secondary: oklch(0.683 0.142 315.2);
  --secondary-foreground: oklch(0.157 0.036 315.252);
  --accent: oklch(0.689 0.114 1.212);
  --accent-foreground: oklch(0.159 0.029 1.208);
  --destructive: oklch(0.567 0.228 29.6);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.705 0.141 334.739);
  --chart-1: oklch(0.705 0.141 334.739);
  --chart-2: oklch(0.683 0.142 315.2);
  --chart-3: oklch(0.689 0.114 1.212);
  --chart-4: oklch(0.71 0.129 315.326);
  --chart-5: oklch(0.705 0.148 334.887);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.007 332.114);
  --muted: oklch(0.178 0.007 315.873);
  --muted-foreground: oklch(0.772 0.002 316.011);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.983 0.005 332.077);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.983 0.005 332.077);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.705 0.141 334.739);
  --primary-foreground: oklch(0.163 0.036 334.914);
  --secondary: oklch(0.683 0.142 315.2);
  --secondary-foreground: oklch(0.157 0.036 315.252);
  --accent: oklch(0.689 0.114 1.212);
  --accent-foreground: oklch(0.159 0.029 1.208);
  --destructive: oklch(0.596 0.24 29.58);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.705 0.141 334.739);
  --chart-1: oklch(0.705 0.141 334.739);
  --chart-2: oklch(0.683 0.142 315.2);
  --chart-3: oklch(0.689 0.114 1.212);
  --chart-4: oklch(0.71 0.129 315.326);
  --chart-5: oklch(0.705 0.148 334.887);
}