Uncertainty for shadcn/ui

Uncertainty is a shadcn/ui theme built around a muted deep green primary color (#394932) with muted deep violet accents (#413249). The light mode uses a neutral background (#fcfefb). Dark mode keeps the muted deep green primary (#394932) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfefbwhite
#000000black
Foreground
#0a1406black
#fcfdfcwhite
Card
#fcfefbwhite
#000000black
Card foreground
#0a1406black
#fcfdfcwhite
Popover
#fcfefbwhite
#000000black
Popover foreground
#0a1406black
#fcfdfcwhite
Primary
#394932darkslategray
#394932darkslategray
Primary foreground
#d4decelightgrey
#d4decelightgrey
Secondary
#413249darkslategray
#413249darkslategray
Secondary foreground
#d9cedelightgrey
#d9cedelightgrey
Muted
#e5dde9gainsboro
#1e1622black
Muted foreground
#4c4351darkslategray
#b7aebcsilver
Accent
#413249darkslategray
#413249darkslategray
Accent foreground
#d9cedelightgrey
#d9cedelightgrey
Destructive
#a62a08firebrick
#e0390borangered
Destructive foreground
#fee8e2mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#394932darkslategray
#394932darkslategray

Contrast

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

Light mode
Text on background18.57:1AAA
Text on card18.57:1AAA
Primary button6.97:1AA
Secondary button7.81:1AAA
Muted text7.10:1AAA
Accent7.81:1AAA
Destructive6.05:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button6.97:1AA
Secondary button7.81:1AAA
Muted text8.21:1AAA
Accent7.81:1AAA
Destructive4.41:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.005 134.852);
  --foreground: oklch(0.175 0.031 135.112);
  --muted: oklch(0.907 0.019 314.726);
  --muted-foreground: oklch(0.398 0.025 314.524);
  --popover: oklch(0.995 0.005 134.852);
  --popover-foreground: oklch(0.175 0.031 135.112);
  --card: oklch(0.995 0.005 134.852);
  --card-foreground: oklch(0.175 0.031 135.112);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.384 0.043 135.449);
  --primary-foreground: oklch(0.888 0.024 134.96);
  --secondary: oklch(0.342 0.045 314.182);
  --secondary-foreground: oklch(0.866 0.024 314.693);
  --accent: oklch(0.342 0.045 314.182);
  --accent-foreground: oklch(0.866 0.024 314.693);
  --destructive: oklch(0.479 0.165 34.456);
  --destructive-foreground: oklch(0.946 0.025 35.95);
  --ring: oklch(0.384 0.043 135.449);
  --chart-1: oklch(0.384 0.043 135.449);
  --chart-2: oklch(0.342 0.045 314.182);
  --chart-3: oklch(0.342 0.045 314.182);
  --chart-4: oklch(0.37 0.049 314.167);
  --chart-5: oklch(0.388 0.049 135.555);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 134.833);
  --muted: oklch(0.216 0.027 314.219);
  --muted-foreground: oklch(0.764 0.021 314.692);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.001 134.833);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.993 0.001 134.833);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.384 0.043 135.449);
  --primary-foreground: oklch(0.888 0.024 134.96);
  --secondary: oklch(0.342 0.045 314.182);
  --secondary-foreground: oklch(0.866 0.024 314.693);
  --accent: oklch(0.342 0.045 314.182);
  --accent-foreground: oklch(0.866 0.024 314.693);
  --destructive: oklch(0.597 0.209 34.103);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.384 0.043 135.449);
  --chart-1: oklch(0.384 0.043 135.449);
  --chart-2: oklch(0.342 0.045 314.182);
  --chart-3: oklch(0.342 0.045 314.182);
  --chart-4: oklch(0.37 0.049 314.167);
  --chart-5: oklch(0.388 0.049 135.555);
}