Rainbow Dark for shadcn/ui

Rainbow Dark is a shadcn/ui theme built around a teal primary color (#25c1a7) with neutral gray accents (#383838). The light mode uses a neutral background (#121212). Dark mode keeps the teal primary (#25c1a7) on a neutral background (#121212).

Color palette

TokenLightDark
Background
#121212black
#121212black
Foreground
#bababasilver
#bababasilver
Card
#0d0d0dblack
#0d0d0dblack
Card foreground
#c7c7c7silver
#c7c7c7silver
Popover
#0a0a0ablack
#0a0a0ablack
Popover foreground
#d4d4d4lightgrey
#d4d4d4lightgrey
Primary
#25c1a7lightseagreen
#25c1a7lightseagreen
Primary foreground
#041513black
#041513black
Secondary
#2d534cdarkslategray
#2d534cdarkslategray
Secondary foreground
#cde4e0gainsboro
#cde4e0gainsboro
Muted
#2b2222darkslategray
#2b2222darkslategray
Muted foreground
#b09b9brosybrown
#b09b9brosybrown
Accent
#383838darkslategray
#383838darkslategray
Accent foreground
#d1d1d1lightgrey
#d1d1d1lightgrey
Destructive
#e8322ccrimson
#e8322ccrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#1f1f1fblack
#1f1f1fblack
Input
#262626darkslategray
#262626darkslategray
Ring
#25c1a7lightseagreen
#25c1a7lightseagreen

Contrast

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

Light mode
Text on background9.66:1AAA
Text on card11.51:1AAA
Primary button8.23:1AAA
Secondary button6.43:1AA
Muted text5.93:1AA
Accent7.66:1AAA
Destructive4.27:1AA Large
Dark mode
Text on background9.66:1AAA
Text on card11.51:1AAA
Primary button8.23:1AAA
Secondary button6.43:1AA
Muted text5.93:1AA
Accent7.66:1AAA
Destructive4.27:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.182 0 164.055);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.261 0.014 18.092);
  --muted-foreground: oklch(0.708 0.025 17.766);
  --popover: oklch(0.146 0 180);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.158 0 169.695);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.238 0 161.565);
  --input: oklch(0.27 0 180);
  --primary: oklch(0.728 0.128 177.796);
  --primary-foreground: oklch(0.181 0.025 181.77);
  --secondary: oklch(0.411 0.045 182.084);
  --secondary-foreground: oklch(0.902 0.025 184.716);
  --accent: oklch(0.341 0 158.199);
  --accent-foreground: oklch(0.861 0 180);
  --destructive: oklch(0.606 0.217 27.991);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.728 0.128 177.796);
  --chart-1: oklch(0.728 0.128 177.796);
  --chart-2: oklch(0.411 0.045 182.084);
  --chart-3: oklch(0.341 0 158.199);
  --chart-4: oklch(0.444 0.05 182.023);
  --chart-5: oklch(0.737 0.131 177.496);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.182 0 164.055);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.261 0.014 18.092);
  --muted-foreground: oklch(0.708 0.025 17.766);
  --popover: oklch(0.146 0 180);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.158 0 169.695);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.238 0 161.565);
  --input: oklch(0.27 0 180);
  --primary: oklch(0.728 0.128 177.796);
  --primary-foreground: oklch(0.181 0.025 181.77);
  --secondary: oklch(0.411 0.045 182.084);
  --secondary-foreground: oklch(0.902 0.025 184.716);
  --accent: oklch(0.341 0 158.199);
  --accent-foreground: oklch(0.861 0 180);
  --destructive: oklch(0.606 0.217 27.991);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.728 0.128 177.796);
  --chart-1: oklch(0.728 0.128 177.796);
  --chart-2: oklch(0.411 0.045 182.084);
  --chart-3: oklch(0.341 0 158.199);
  --chart-4: oklch(0.444 0.05 182.023);
  --chart-5: oklch(0.737 0.131 177.496);
}