Genetics for shadcn/ui

Genetics is a shadcn/ui theme built around a muted yellow primary color (#b3b3a2) with muted green accents (#aab3a2). The light mode uses a neutral background (#fefefb). Dark mode keeps the muted yellow primary (#b3b3a2) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefefbwhite
#000000black
Foreground
#101004black
#ffffffwhite
Card
#fefefbwhite
#000000black
Card foreground
#101004black
#ffffffwhite
Popover
#fefefbwhite
#000000black
Popover foreground
#101004black
#ffffffwhite
Primary
#b3b3a2darkgray
#b3b3a2darkgray
Primary foreground
#141410black
#141410black
Secondary
#b3aba2darkgray
#b3aba2darkgray
Secondary foreground
#141210black
#141210black
Muted
#e8e6e3gainsboro
#1c1a17black
Muted foreground
#54524fdarkslategray
#b0aeabdarkgray
Accent
#aab3a2darkgray
#aab3a2darkgray
Accent foreground
#121410black
#121410black
Destructive
#c81c09firebrick
#f42710orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b3b3a2darkgray
#b3b3a2darkgray

Contrast

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

Light mode
Text on background18.91:1AAA
Text on card18.91:1AAA
Primary button8.70:1AAA
Secondary button8.27:1AAA
Muted text6.23:1AA
Accent8.56:1AAA
Destructive5.79:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button8.70:1AAA
Secondary button8.27:1AAA
Muted text7.86:1AAA
Accent8.56:1AAA
Destructive4.08:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 108.013);
  --foreground: oklch(0.17 0.025 110.332);
  --muted: oklch(0.925 0.004 71.413);
  --muted-foreground: oklch(0.439 0.005 71.347);
  --popover: oklch(0.996 0.004 108.013);
  --popover-foreground: oklch(0.17 0.025 110.332);
  --card: oklch(0.996 0.004 108.013);
  --card-foreground: oklch(0.17 0.025 110.332);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.762 0.023 108.497);
  --primary-foreground: oklch(0.188 0.007 108.615);
  --secondary: oklch(0.747 0.016 71.26);
  --secondary-foreground: oklch(0.183 0.005 71.212);
  --accent: oklch(0.756 0.026 130.128);
  --accent-foreground: oklch(0.186 0.008 130.206);
  --destructive: oklch(0.532 0.205 30.438);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.762 0.023 108.497);
  --chart-1: oklch(0.762 0.023 108.497);
  --chart-2: oklch(0.747 0.016 71.26);
  --chart-3: oklch(0.756 0.026 130.128);
  --chart-4: oklch(0.77 0.014 71.286);
  --chart-5: oklch(0.769 0.03 108.65);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.218 0.006 71.202);
  --muted-foreground: oklch(0.751 0.005 71.398);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.762 0.023 108.497);
  --primary-foreground: oklch(0.188 0.007 108.615);
  --secondary: oklch(0.747 0.016 71.26);
  --secondary-foreground: oklch(0.183 0.005 71.212);
  --accent: oklch(0.756 0.026 130.128);
  --accent-foreground: oklch(0.186 0.008 130.206);
  --destructive: oklch(0.62 0.237 30.465);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.762 0.023 108.497);
  --chart-1: oklch(0.762 0.023 108.497);
  --chart-2: oklch(0.747 0.016 71.26);
  --chart-3: oklch(0.756 0.026 130.128);
  --chart-4: oklch(0.77 0.014 71.286);
  --chart-5: oklch(0.769 0.03 108.65);
}