Precious for shadcn/ui

Precious is a shadcn/ui theme built around a near-black primary color (#0a0105) with near-black accents (#0a0101). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#0a0105) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#0c0308black
#f8f7f7whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#0c0308black
#f8f7f7whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#0c0308black
#f8f7f7whitesmoke
Primary
#0a0105black
#0a0105black
Primary foreground
#f448a1hotpink
#f448a1hotpink
Secondary
#09010ablack
#09010ablack
Secondary foreground
#f148f4orchid
#f148f4orchid
Muted
#ded8dfgainsboro
#272027darkslategray
Muted foreground
#525252darkslategray
#adadaddarkgray
Accent
#0a0101black
#0a0101black
Accent foreground
#faa8aalightpink
#faa8aalightpink
Destructive
#7e0501maroon
#fd322borangered
Destructive foreground
#feb6b3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0a0105black
#0a0105black

Contrast

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

Light mode
Text on background20.34:1AAA
Text on card20.34:1AAA
Primary button6.18:1AA
Secondary button6.84:1AA
Muted text5.58:1AA
Accent11.07:1AAA
Destructive6.55:1AA
Dark mode
Text on background19.63:1AAA
Text on card19.63:1AAA
Primary button6.18:1AA
Secondary button6.84:1AA
Muted text7.05:1AAA
Accent11.07:1AAA
Destructive3.70:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.122 0.025 344.479);
  --muted: oklch(0.889 0.011 325.186);
  --muted-foreground: oklch(0.437 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.122 0.025 344.479);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.122 0.025 344.479);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.1 0.036 344.042);
  --primary-foreground: oklch(0.671 0.222 353.145);
  --secondary: oklch(0.104 0.041 327.641);
  --secondary-foreground: oklch(0.705 0.272 327.275);
  --accent: oklch(0.095 0.032 23.406);
  --accent-foreground: oklch(0.812 0.097 18.303);
  --destructive: oklch(0.376 0.15 29.692);
  --destructive-foreground: oklch(0.843 0.085 21.236);
  --ring: oklch(0.1 0.036 344.042);
  --chart-1: oklch(0.1 0.036 344.042);
  --chart-2: oklch(0.104 0.041 327.641);
  --chart-3: oklch(0.095 0.032 23.406);
  --chart-4: oklch(0.15 0.062 327.5);
  --chart-5: oklch(0.099 0.037 344.031);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.976 0.002 344.337);
  --muted: oklch(0.255 0.015 325.5);
  --muted-foreground: oklch(0.749 0 158.199);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.976 0.002 344.337);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.976 0.002 344.337);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.1 0.036 344.042);
  --primary-foreground: oklch(0.671 0.222 353.145);
  --secondary: oklch(0.104 0.041 327.641);
  --secondary-foreground: oklch(0.705 0.272 327.275);
  --accent: oklch(0.095 0.032 23.406);
  --accent-foreground: oklch(0.812 0.097 18.303);
  --destructive: oklch(0.644 0.237 28.295);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.1 0.036 344.042);
  --chart-1: oklch(0.1 0.036 344.042);
  --chart-2: oklch(0.104 0.041 327.641);
  --chart-3: oklch(0.095 0.032 23.406);
  --chart-4: oklch(0.15 0.062 327.5);
  --chart-5: oklch(0.099 0.037 344.031);
}