Mycoplasma for shadcn/ui

Mycoplasma is a shadcn/ui theme built around a yellow primary color (#b4a16a) with purple accents (#a16ab4). The light mode uses a neutral background (#fefdfb). Dark mode keeps the yellow primary (#b4a16a) on a yellow-tinted background (#0e0c07).

Color palette

TokenLightDark
Background
#fefdfbsnow
#0e0c07black
Foreground
#141006black
#faf9f5whitesmoke
Card
#fdfbf7snow
#110f08black
Card foreground
#100d04black
#fcfbf8snow
Popover
#fefdfbsnow
#0e0c07black
Popover foreground
#141006black
#faf9f5whitesmoke
Primary
#b4a16adarkkhaki
#b4a16adarkkhaki
Primary foreground
#000000black
#000000black
Secondary
#6ab4a1cadetblue
#6ab4a1cadetblue
Secondary foreground
#000000black
#000000black
Muted
#e3edealavender
#121c19black
Muted foreground
#394643darkslategray
#b9c6c2silver
Accent
#a16ab4mediumpurple
#a16ab4mediumpurple
Accent foreground
#000000black
#000000black
Destructive
#b72110firebrick
#eb321eorangered
Destructive foreground
#fffbfasnow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b4a16adarkkhaki
#b4a16adarkkhaki

Contrast

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

Light mode
Text on background18.67:1AAA
Text on card18.80:1AAA
Primary button8.26:1AAA
Secondary button8.64:1AAA
Muted text8.23:1AAA
Accent5.23:1AA
Destructive6.31:1AA
Dark mode
Text on background18.55:1AAA
Text on card18.50:1AAA
Primary button8.26:1AAA
Secondary button8.64:1AAA
Muted text9.91:1AAA
Accent5.23:1AA
Destructive4.17:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 91.434);
  --foreground: oklch(0.175 0.022 92.643);
  --muted: oklch(0.937 0.01 179.552);
  --muted-foreground: oklch(0.382 0.017 178.509);
  --popover: oklch(0.994 0.003 91.434);
  --popover-foreground: oklch(0.175 0.022 92.643);
  --card: oklch(0.989 0.006 91.458);
  --card-foreground: oklch(0.16 0.019 93.789);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.713 0.077 91.725);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.716 0.08 176.065);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.61 0.124 317.354);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.504 0.187 30.52);
  --destructive-foreground: oklch(0.99 0.004 25.024);
  --ring: oklch(0.713 0.077 91.725);
  --chart-1: oklch(0.713 0.077 91.725);
  --chart-2: oklch(0.716 0.08 176.065);
  --chart-3: oklch(0.61 0.124 317.354);
  --chart-4: oklch(0.735 0.075 176.475);
  --chart-5: oklch(0.719 0.083 91.665);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.155 0.012 92.956);
  --foreground: oklch(0.981 0.005 91.454);
  --muted: oklch(0.215 0.014 177.829);
  --muted-foreground: oklch(0.815 0.015 179.346);
  --popover: oklch(0.155 0.012 92.956);
  --popover-foreground: oklch(0.981 0.005 91.454);
  --card: oklch(0.169 0.014 92.056);
  --card-foreground: oklch(0.987 0.003 91.439);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.713 0.077 91.725);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.716 0.08 176.065);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.61 0.124 317.354);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.612 0.222 30.499);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.713 0.077 91.725);
  --chart-1: oklch(0.713 0.077 91.725);
  --chart-2: oklch(0.716 0.08 176.065);
  --chart-3: oklch(0.61 0.124 317.354);
  --chart-4: oklch(0.735 0.075 176.475);
  --chart-5: oklch(0.719 0.083 91.665);
}