Laboratory for shadcn/ui

Laboratory is a shadcn/ui theme built around a muted indigo primary color (#686892) with muted yellow accents (#929268). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the muted indigo primary (#686892) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#000000black
Foreground
#030311black
#fcfcfdwhite
Card
#f5f5fawhitesmoke
#030303black
Card foreground
#03030dblack
#ffffffwhite
Popover
#f8f8fcghostwhite
#000000black
Popover foreground
#030311black
#fcfcfdwhite
Primary
#686892slategray
#686892slategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#929268gray
#929268gray
Secondary foreground
#000000black
#000000black
Muted
#e8e8cfantiquewhite
#303017darkslategray
Muted foreground
#66664ddimgray
#b2b299darkgray
Accent
#929268gray
#929268gray
Accent foreground
#000000black
#000000black
Destructive
#722104maroon
#f85316orangered
Destructive foreground
#fcc1ablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#686892slategray
#686892slategray

Contrast

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

Light mode
Text on background19.36:1AAA
Text on card18.86:1AAA
Primary button5.28:1AA
Secondary button6.54:1AA
Muted text4.71:1AA
Accent6.54:1AA
Destructive6.91:1AA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button5.28:1AA
Secondary button6.54:1AA
Muted text6.21:1AA
Accent6.54:1AA
Destructive3.37:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.004 286.317);
  --foreground: oklch(0.113 0.035 279.176);
  --muted: oklch(0.924 0.033 107.03);
  --muted-foreground: oklch(0.502 0.038 107.685);
  --popover: oklch(0.981 0.004 286.317);
  --popover-foreground: oklch(0.113 0.035 279.176);
  --card: oklch(0.971 0.007 286.274);
  --card-foreground: oklch(0.102 0.03 279.549);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.533 0.066 283.929);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.65 0.059 107.946);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.65 0.059 107.946);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.373 0.119 37.637);
  --destructive-foreground: oklch(0.858 0.075 40.881);
  --ring: oklch(0.533 0.066 283.929);
  --chart-1: oklch(0.533 0.066 283.929);
  --chart-2: oklch(0.65 0.059 107.946);
  --chart-3: oklch(0.65 0.059 107.946);
  --chart-4: oklch(0.674 0.058 107.86);
  --chart-5: oklch(0.524 0.078 283.373);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 286.384);
  --muted: oklch(0.303 0.041 108.593);
  --muted-foreground: oklch(0.758 0.035 107.198);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 286.384);
  --card: oklch(0.092 0 180);
  --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.533 0.066 283.929);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.65 0.059 107.946);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.65 0.059 107.946);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.662 0.211 37.315);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.533 0.066 283.929);
  --chart-1: oklch(0.533 0.066 283.929);
  --chart-2: oklch(0.65 0.059 107.946);
  --chart-3: oklch(0.65 0.059 107.946);
  --chart-4: oklch(0.674 0.058 107.86);
  --chart-5: oklch(0.524 0.078 283.373);
}