Gene for shadcn/ui

Gene is a shadcn/ui theme built around a muted light purple primary color (#e9e2e9) with muted light teal accents (#e2e9e9). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light purple primary (#e9e2e9) on a neutral background (#070208).

Color palette

TokenLightDark
Background
#ffffffwhite
#070208black
Foreground
#130514black
#fdfbfdsnow
Card
#fcfcfcsnow
#0b030cblack
Card foreground
#0f0410black
#ffffffwhite
Popover
#ffffffwhite
#070208black
Popover foreground
#130514black
#fdfbfdsnow
Primary
#e9e2e9lavender
#e9e2e9lavender
Primary foreground
#564158darkslategray
#564158darkslategray
Secondary
#e9e9e2beige
#e9e9e2beige
Secondary foreground
#585641darkolivegreen
#585641darkolivegreen
Muted
#ebeae0beige
#1f1e14black
Muted foreground
#5e5d5adimgray
#a5a5a1darkgray
Accent
#e2e9e9lavender
#e2e9e9lavender
Accent foreground
#415856darkslategray
#415856darkslategray
Destructive
#672504maroon
#f8793acoral
Destructive foreground
#fcc0a1navajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e9e2e9lavender
#e9e2e9lavender

Contrast

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

Light mode
Text on background19.82:1AAA
Text on card19.66:1AAA
Primary button7.18:1AAA
Secondary button6.09:1AA
Muted text5.43:1AA
Accent6.20:1AA
Destructive7.14:1AAA
Dark mode
Text on background19.93:1AAA
Text on card20.29:1AAA
Primary button7.18:1AAA
Secondary button6.09:1AA
Muted text6.79:1AA
Accent6.20:1AA
Destructive7.80:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.15 0.038 324.291);
  --muted: oklch(0.934 0.012 102.429);
  --muted-foreground: oklch(0.479 0.005 102.392);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.15 0.038 324.291);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.137 0.033 324.426);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.92 0.013 323.198);
  --primary-foreground: oklch(0.407 0.046 323.631);
  --secondary: oklch(0.932 0.009 102.376);
  --secondary-foreground: oklch(0.449 0.033 103.295);
  --accent: oklch(0.929 0.008 191.056);
  --accent-foreground: oklch(0.441 0.028 189.82);
  --destructive: oklch(0.359 0.104 42.331);
  --destructive-foreground: oklch(0.853 0.08 47.756);
  --ring: oklch(0.92 0.013 323.198);
  --chart-1: oklch(0.92 0.013 323.198);
  --chart-2: oklch(0.932 0.009 102.376);
  --chart-3: oklch(0.929 0.008 191.056);
  --chart-4: oklch(0.952 0.007 102.324);
  --chart-5: oklch(0.919 0.015 323.211);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.024 324.824);
  --foreground: oklch(0.991 0.003 323.149);
  --muted: oklch(0.232 0.017 103.31);
  --muted-foreground: oklch(0.72 0.005 102.321);
  --popover: oklch(0.108 0.024 324.824);
  --popover-foreground: oklch(0.991 0.003 323.149);
  --card: oklch(0.123 0.028 324.653);
  --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.92 0.013 323.198);
  --primary-foreground: oklch(0.407 0.046 323.631);
  --secondary: oklch(0.932 0.009 102.376);
  --secondary-foreground: oklch(0.449 0.033 103.295);
  --accent: oklch(0.929 0.008 191.056);
  --accent-foreground: oklch(0.441 0.028 189.82);
  --destructive: oklch(0.715 0.172 44.704);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.92 0.013 323.198);
  --chart-1: oklch(0.92 0.013 323.198);
  --chart-2: oklch(0.932 0.009 102.376);
  --chart-3: oklch(0.929 0.008 191.056);
  --chart-4: oklch(0.952 0.007 102.324);
  --chart-5: oklch(0.919 0.015 323.211);
}