Rainbow for shadcn/ui

Rainbow is a shadcn/ui theme built around a vivid light indigo primary color (#c6bef9) with near-white accents (#e8e8e8). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the vivid light indigo primary (#c6bef9) on an indigo-tinted background (#07060e).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#07060eblack
Foreground
#05030cblack
#f9f9fbghostwhite
Card
#f9f8fcghostwhite
#07060eblack
Card foreground
#05030cblack
#f9f9fbghostwhite
Popover
#f9f8fcghostwhite
#07060eblack
Popover foreground
#05030cblack
#f9f9fbghostwhite
Primary
#c6bef9lightsteelblue
#c6bef9lightsteelblue
Primary foreground
#1a0c79midnightblue
#1a0c79midnightblue
Secondary
#e8e8e8lavender
#1c1b1dblack
Secondary foreground
#4e4e50darkslategray
#b4b4b7silver
Muted
#f0f0f5whitesmoke
#0b0a0fblack
Muted foreground
#5b586fdimgray
#9390a7lightslategray
Accent
#e8e8e8lavender
#1c1b1dblack
Accent foreground
#4e4e50darkslategray
#b4b4b7silver
Destructive
#a0230dfirebrick
#ef5034tomato
Destructive foreground
#fde7e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c6bef9lightsteelblue
#c6bef9lightsteelblue

Contrast

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

Light mode
Text on background19.36:1AAA
Text on card19.36:1AAA
Primary button8.83:1AAA
Secondary button6.76:1AA
Muted text6.01:1AA
Accent6.76:1AA
Destructive6.44:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button8.83:1AAA
Secondary button8.27:1AAA
Muted text6.36:1AA
Accent8.27:1AAA
Destructive3.58: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.981 0.005 292.447);
  --foreground: oklch(0.111 0.024 290.342);
  --muted: oklch(0.956 0.006 292.416);
  --muted-foreground: oklch(0.471 0.038 290.959);
  --popover: oklch(0.981 0.005 292.447);
  --popover-foreground: oklch(0.111 0.024 290.342);
  --card: oklch(0.981 0.005 292.447);
  --card-foreground: oklch(0.111 0.024 290.342);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.828 0.082 290.607);
  --primary-foreground: oklch(0.284 0.165 273.931);
  --secondary: oklch(0.931 0.001 292.531);
  --secondary-foreground: oklch(0.426 0.003 292.429);
  --accent: oklch(0.931 0.001 292.531);
  --accent-foreground: oklch(0.426 0.003 292.429);
  --destructive: oklch(0.463 0.164 32.146);
  --destructive-foreground: oklch(0.943 0.025 29.579);
  --ring: oklch(0.828 0.082 290.607);
  --chart-1: oklch(0.828 0.082 290.607);
  --chart-2: oklch(0.931 0.001 292.531);
  --chart-3: oklch(0.931 0.001 292.531);
  --chart-4: oklch(0.954 0 292.536);
  --chart-5: oklch(0.826 0.085 290.525);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.131 0.018 290.833);
  --foreground: oklch(0.983 0.002 292.497);
  --muted: oklch(0.15 0.01 291.204);
  --muted-foreground: oklch(0.663 0.035 291.526);
  --popover: oklch(0.131 0.018 290.833);
  --popover-foreground: oklch(0.983 0.002 292.497);
  --card: oklch(0.131 0.018 290.833);
  --card-foreground: oklch(0.983 0.002 292.497);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.828 0.082 290.607);
  --primary-foreground: oklch(0.284 0.165 273.931);
  --secondary: oklch(0.225 0.002 292.363);
  --secondary-foreground: oklch(0.77 0.004 292.442);
  --accent: oklch(0.225 0.002 292.363);
  --accent-foreground: oklch(0.77 0.004 292.442);
  --destructive: oklch(0.647 0.199 32.36);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.828 0.082 290.607);
  --chart-1: oklch(0.828 0.082 290.607);
  --chart-2: oklch(0.225 0.002 292.363);
  --chart-3: oklch(0.225 0.002 292.363);
  --chart-4: oklch(0.257 0.003 292.349);
  --chart-5: oklch(0.826 0.085 290.525);
}