Precious for shadcn/ui

Precious is a shadcn/ui theme built around a teal primary color (#2e9984) with red accents (#992e43). The light mode uses a neutral background (#f7fcfb). Dark mode keeps the teal primary (#2e9984) on a teal-tinted background (#040b0a).

Color palette

TokenLightDark
Background
#f7fcfbmintcream
#040b0ablack
Foreground
#051411black
#fcfdfdwhite
Card
#f4fbfamintcream
#060e0dblack
Card foreground
#04100eblack
#ffffffwhite
Popover
#f4fbfamintcream
#060e0dblack
Popover foreground
#04100eblack
#ffffffwhite
Primary
#2e9984mediumseagreen
#2e9984mediumseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#992e43brown
#992e43brown
Secondary foreground
#fefbfcsnow
#fefbfcsnow
Muted
#e5d7dagainsboro
#281a1dblack
Muted foreground
#555354dimgray
#acaaaadarkgray
Accent
#992e43brown
#992e43brown
Accent foreground
#fefbfcsnow
#fefbfcsnow
Destructive
#981a06darkred
#e6270aorangered
Destructive foreground
#fdd9d3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2e9984mediumseagreen
#2e9984mediumseagreen

Contrast

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

Light mode
Text on background18.25:1AAA
Text on card18.44:1AAA
Primary button3.49:1AA Large
Secondary button7.22:1AAA
Muted text5.46:1AA
Accent7.22:1AAA
Destructive6.47:1AA
Dark mode
Text on background19.49:1AAA
Text on card19.46:1AAA
Primary button3.49:1AA Large
Secondary button7.22:1AAA
Muted text7.22:1AAA
Accent7.22:1AAA
Destructive4.50:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 183.031);
  --foreground: oklch(0.178 0.023 179.605);
  --muted: oklch(0.891 0.016 3.66);
  --muted-foreground: oklch(0.445 0.002 3.321);
  --popover: oklch(0.982 0.008 182.953);
  --popover-foreground: oklch(0.161 0.02 180.638);
  --card: oklch(0.982 0.008 182.953);
  --card-foreground: oklch(0.161 0.02 180.638);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.618 0.101 176.479);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.142 12.898);
  --secondary-foreground: oklch(0.991 0.003 3.267);
  --accent: oklch(0.468 0.142 12.898);
  --accent-foreground: oklch(0.991 0.003 3.267);
  --destructive: oklch(0.439 0.163 31.449);
  --destructive-foreground: oklch(0.913 0.042 28.234);
  --ring: oklch(0.618 0.101 176.479);
  --chart-1: oklch(0.618 0.101 176.479);
  --chart-2: oklch(0.468 0.142 12.898);
  --chart-3: oklch(0.468 0.142 12.898);
  --chart-4: oklch(0.494 0.151 13.006);
  --chart-5: oklch(0.625 0.105 176.134);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.012 182.919);
  --foreground: oklch(0.993 0.001 183.158);
  --muted: oklch(0.237 0.023 5.7);
  --muted-foreground: oklch(0.74 0.002 3.257);
  --popover: oklch(0.156 0.014 181.317);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.156 0.014 181.317);
  --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.618 0.101 176.479);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.142 12.898);
  --secondary-foreground: oklch(0.991 0.003 3.267);
  --accent: oklch(0.468 0.142 12.898);
  --accent-foreground: oklch(0.991 0.003 3.267);
  --destructive: oklch(0.595 0.226 31.175);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.618 0.101 176.479);
  --chart-1: oklch(0.618 0.101 176.479);
  --chart-2: oklch(0.468 0.142 12.898);
  --chart-3: oklch(0.468 0.142 12.898);
  --chart-4: oklch(0.494 0.151 13.006);
  --chart-5: oklch(0.625 0.105 176.134);
}