Crystal for shadcn/ui

Crystal is a shadcn/ui theme built around a deep red primary color (#63121c) with deep orange accents (#633112). The light mode uses a neutral background (#fdfbfc). Dark mode keeps the deep red primary (#63121c) on a neutral background (#080203).

Color palette

TokenLightDark
Background
#fdfbfcsnow
#080203black
Foreground
#040101black
#faf5f6whitesmoke
Card
#fdfbfcsnow
#080203black
Card foreground
#040101black
#faf5f6whitesmoke
Popover
#fdfbfcsnow
#080203black
Popover foreground
#040101black
#faf5f6whitesmoke
Primary
#63121cmaroon
#63121cmaroon
Primary foreground
#f2b6bdlightpink
#f2b6bdlightpink
Secondary
#631244indigo
#631244indigo
Secondary foreground
#f2b6dbpink
#f2b6dbpink
Muted
#f6eaf1lavenderblush
#150911black
Muted foreground
#6a5361dimgray
#ac95a3darkgray
Accent
#633112saddlebrown
#633112saddlebrown
Accent foreground
#f2cdb6wheat
#f2cdb6wheat
Destructive
#b8440afirebrick
#f47434tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#63121cmaroon
#63121cmaroon

Contrast

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

Light mode
Text on background20.24:1AAA
Text on card20.24:1AAA
Primary button7.45:1AAA
Secondary button7.33:1AAA
Muted text5.93:1AA
Accent7.15:1AAA
Destructive5.42:1AA
Dark mode
Text on background19.03:1AAA
Text on card19.03:1AAA
Primary button7.45:1AAA
Secondary button7.33:1AAA
Muted text7.01:1AAA
Accent7.15:1AAA
Destructive7.39:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 8.962);
  --foreground: oklch(0.08 0.018 10.571);
  --muted: oklch(0.948 0.016 339.831);
  --muted-foreground: oklch(0.47 0.037 341.107);
  --popover: oklch(0.991 0.002 8.962);
  --popover-foreground: oklch(0.08 0.018 10.571);
  --card: oklch(0.991 0.002 8.962);
  --card-foreground: oklch(0.08 0.018 10.571);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.331 0.113 20.113);
  --primary-foreground: oklch(0.832 0.07 10.907);
  --secondary: oklch(0.344 0.124 347.988);
  --secondary-foreground: oklch(0.841 0.084 341.541);
  --accent: oklch(0.374 0.084 49.359);
  --accent-foreground: oklch(0.873 0.052 53.707);
  --destructive: oklch(0.54 0.162 40.971);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.331 0.113 20.113);
  --chart-1: oklch(0.331 0.113 20.113);
  --chart-2: oklch(0.344 0.124 347.988);
  --chart-3: oklch(0.374 0.084 49.359);
  --chart-4: oklch(0.374 0.137 348.185);
  --chart-5: oklch(0.333 0.117 20.702);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.016 9.992);
  --foreground: oklch(0.974 0.005 9.035);
  --muted: oklch(0.163 0.024 342.54);
  --muted-foreground: oklch(0.695 0.033 340.489);
  --popover: oklch(0.105 0.016 9.992);
  --popover-foreground: oklch(0.974 0.005 9.035);
  --card: oklch(0.105 0.016 9.992);
  --card-foreground: oklch(0.974 0.005 9.035);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.331 0.113 20.113);
  --primary-foreground: oklch(0.832 0.07 10.907);
  --secondary: oklch(0.344 0.124 347.988);
  --secondary-foreground: oklch(0.841 0.084 341.541);
  --accent: oklch(0.374 0.084 49.359);
  --accent-foreground: oklch(0.873 0.052 53.707);
  --destructive: oklch(0.701 0.175 44.314);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.331 0.113 20.113);
  --chart-1: oklch(0.331 0.113 20.113);
  --chart-2: oklch(0.344 0.124 347.988);
  --chart-3: oklch(0.374 0.084 49.359);
  --chart-4: oklch(0.374 0.137 348.185);
  --chart-5: oklch(0.333 0.117 20.702);
}