Rainbow for shadcn/ui

Rainbow is a shadcn/ui theme built around a vivid teal primary color (#00c78b) with muted orange accents (#554b44). The light mode uses an orange-tinted background (#2a2522). Dark mode keeps the vivid teal primary (#00c78b) on an orange-tinted background (#2a2522).

Color palette

TokenLightDark
Background
#2a2522darkslategray
#2a2522darkslategray
Foreground
#e4e3e2gainsboro
#e4e3e2gainsboro
Card
#25201eblack
#25201eblack
Card foreground
#f0f0efwhitesmoke
#f0f0efwhitesmoke
Popover
#221e1bblack
#221e1bblack
Popover foreground
#fdfcfcsnow
#fdfcfcsnow
Primary
#00c78blightseagreen
#00c78blightseagreen
Primary foreground
#000000black
#000000black
Secondary
#2d5347darkslategray
#2d5347darkslategray
Secondary foreground
#cde4ddgainsboro
#cde4ddgainsboro
Muted
#362f2bdarkslategray
#362f2bdarkslategray
Muted foreground
#b9aea6darkgray
#b9aea6darkgray
Accent
#554b44darkolivegreen
#554b44darkolivegreen
Accent foreground
#e8e5e3gainsboro
#e8e5e3gainsboro
Destructive
#ed4545tomato
#ed4545tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#343332darkslategray
#343332darkslategray
Input
#3b3b3adarkslategray
#3b3b3adarkslategray
Ring
#00c78blightseagreen
#00c78blightseagreen

Contrast

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

Light mode
Text on background11.77:1AAA
Text on card14.11:1AAA
Primary button9.53:1AAA
Secondary button6.46:1AA
Muted text6.03:1AA
Accent6.79:1AA
Destructive3.79:1AA Large
Dark mode
Text on background11.77:1AAA
Text on card14.11:1AAA
Primary button9.53:1AAA
Secondary button6.46:1AA
Muted text6.03:1AA
Accent6.79:1AA
Destructive3.79:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.27 0.01 54.019);
  --foreground: oklch(0.917 0.003 84.559);
  --muted: oklch(0.312 0.013 53.944);
  --muted-foreground: oklch(0.758 0.017 54.201);
  --popover: oklch(0.238 0.008 52.137);
  --popover-foreground: oklch(0.993 0 84.552);
  --card: oklch(0.249 0.009 52.127);
  --card-foreground: oklch(0.955 0.001 84.555);
  --border: oklch(0.321 0.001 52.532);
  --input: oklch(0.351 0.001 54.456);
  --primary: oklch(0.734 0.159 162.888);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.409 0.048 172.471);
  --secondary-foreground: oklch(0.901 0.026 175.792);
  --accent: oklch(0.419 0.018 53.944);
  --accent-foreground: oklch(0.923 0.005 52.51);
  --destructive: oklch(0.634 0.204 25.157);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.734 0.159 162.888);
  --chart-1: oklch(0.734 0.159 162.888);
  --chart-2: oklch(0.409 0.048 172.471);
  --chart-3: oklch(0.419 0.018 53.944);
  --chart-4: oklch(0.442 0.053 172.39);
  --chart-5: oklch(0.741 0.162 162.577);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.27 0.01 54.019);
  --foreground: oklch(0.917 0.003 84.559);
  --muted: oklch(0.312 0.013 53.944);
  --muted-foreground: oklch(0.758 0.017 54.201);
  --popover: oklch(0.238 0.008 52.137);
  --popover-foreground: oklch(0.993 0 84.552);
  --card: oklch(0.249 0.009 52.127);
  --card-foreground: oklch(0.955 0.001 84.555);
  --border: oklch(0.321 0.001 52.532);
  --input: oklch(0.351 0.001 54.456);
  --primary: oklch(0.734 0.159 162.888);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.409 0.048 172.471);
  --secondary-foreground: oklch(0.901 0.026 175.792);
  --accent: oklch(0.419 0.018 53.944);
  --accent-foreground: oklch(0.923 0.005 52.51);
  --destructive: oklch(0.634 0.204 25.157);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.734 0.159 162.888);
  --chart-1: oklch(0.734 0.159 162.888);
  --chart-2: oklch(0.409 0.048 172.471);
  --chart-3: oklch(0.419 0.018 53.944);
  --chart-4: oklch(0.442 0.053 172.39);
  --chart-5: oklch(0.741 0.162 162.577);
}