Mycoplasma for shadcn/ui

Mycoplasma is a shadcn/ui theme built around a green primary color (#249e2c) with purple accents (#9e2496). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#249e2c) on a neutral background (#010401).

Color palette

TokenLightDark
Background
#ffffffwhite
#010401black
Foreground
#030c04black
#fcfdfcwhite
Card
#fcfcfcsnow
#020803black
Card foreground
#020803black
#ffffffwhite
Popover
#ffffffwhite
#010401black
Popover foreground
#030c04black
#fcfdfcwhite
Primary
#249e2cforestgreen
#249e2cforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#9e2496darkmagenta
#9e2496darkmagenta
Secondary foreground
#fdf7fdsnow
#fdf7fdsnow
Muted
#e3dee3gainsboro
#211c21black
Muted foreground
#544553darkslategray
#baabb9silver
Accent
#9e2496darkmagenta
#9e2496darkmagenta
Accent foreground
#fdf7fdsnow
#fdf7fdsnow
Destructive
#ad1700firebrick
#ff4e33tomato
Destructive foreground
#ffe4e0mistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#249e2cforestgreen
#249e2cforestgreen

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.78:1AAA
Primary button3.50:1AA Large
Secondary button6.33:1AA
Muted text6.70:1AA
Accent6.33:1AA
Destructive5.98:1AA
Dark mode
Text on background20.20:1AAA
Text on card20.22:1AAA
Primary button3.50:1AA Large
Secondary button6.33:1AA
Muted text7.67:1AAA
Accent6.33:1AA
Destructive6.39:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.14 0.026 146.146);
  --muted: oklch(0.905 0.009 327.645);
  --muted-foreground: oklch(0.411 0.031 328.256);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.14 0.026 146.146);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.122 0.022 146.179);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.612 0.184 143.673);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.501 0.199 331.081);
  --secondary-foreground: oklch(0.982 0.01 327.65);
  --accent: oklch(0.501 0.199 331.081);
  --accent-foreground: oklch(0.982 0.01 327.65);
  --destructive: oklch(0.479 0.185 31.318);
  --destructive-foreground: oklch(0.941 0.03 28.124);
  --ring: oklch(0.612 0.184 143.673);
  --chart-1: oklch(0.612 0.184 143.673);
  --chart-2: oklch(0.501 0.199 331.081);
  --chart-3: oklch(0.501 0.199 331.081);
  --chart-4: oklch(0.53 0.211 331.101);
  --chart-5: oklch(0.619 0.19 143.562);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.017 146.205);
  --foreground: oklch(0.993 0.001 147.533);
  --muted: oklch(0.234 0.013 328.067);
  --muted-foreground: oklch(0.758 0.026 327.883);
  --popover: oklch(0.097 0.017 146.205);
  --popover-foreground: oklch(0.993 0.001 147.533);
  --card: oklch(0.122 0.022 146.205);
  --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.612 0.184 143.673);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.501 0.199 331.081);
  --secondary-foreground: oklch(0.982 0.01 327.65);
  --accent: oklch(0.501 0.199 331.081);
  --accent-foreground: oklch(0.982 0.01 327.65);
  --destructive: oklch(0.671 0.217 31.616);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.612 0.184 143.673);
  --chart-1: oklch(0.612 0.184 143.673);
  --chart-2: oklch(0.501 0.199 331.081);
  --chart-3: oklch(0.501 0.199 331.081);
  --chart-4: oklch(0.53 0.211 331.101);
  --chart-5: oklch(0.619 0.19 143.562);
}