Carbonight (rainglow) for shadcn/ui

Carbonight (rainglow) is a shadcn/ui theme built around a neutral gray primary color (#b0b0b0) with neutral gray accents (#54514f). The light mode uses a neutral background (#2d2b2a). Dark mode keeps the neutral gray primary (#b0b0b0) on a neutral background (#2d2b2a).

Color palette

TokenLightDark
Background
#2d2b2adarkslategray
#2d2b2adarkslategray
Foreground
#b0b0b0darkgray
#b0b0b0darkgray
Card
#272625darkslategray
#272625darkslategray
Card foreground
#bdbdbdsilver
#bdbdbdsilver
Popover
#252323black
#252323black
Popover foreground
#c9c9c9silver
#c9c9c9silver
Primary
#b0b0b0darkgray
#b0b0b0darkgray
Primary foreground
#171717black
#171717black
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#3c332fdarkslategray
#3c332fdarkslategray
Muted foreground
#beb2acdarkgray
#beb2acdarkgray
Accent
#54514fdarkslategray
#54514fdarkslategray
Accent foreground
#ebeaealinen
#ebeaealinen
Destructive
#fa1814red
#fa1814red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#383838darkslategray
#383838darkslategray
Input
#404040darkslategray
#404040darkslategray
Ring
#b0b0b0darkgray
#b0b0b0darkgray

Contrast

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

Light mode
Text on background6.50:1AA
Text on card8.04:1AAA
Primary button8.26:1AAA
Secondary button7.37:1AAA
Muted text5.92:1AA
Accent6.57:1AA
Destructive4.02:1AA Large
Dark mode
Text on background6.50:1AA
Text on card8.04:1AAA
Primary button8.26:1AAA
Secondary button7.37:1AAA
Muted text5.92:1AA
Accent6.57:1AA
Destructive4.02:1AA Large

CSS variables

Paste this into your globals.css to use Carbonight (rainglow) in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.29 0.003 48.626);
  --foreground: oklch(0.757 0 180);
  --muted: oklch(0.33 0.014 48.263);
  --muted-foreground: oklch(0.772 0.016 48.506);
  --popover: oklch(0.259 0.003 48.632);
  --popover-foreground: oklch(0.837 0 171.254);
  --card: oklch(0.269 0.003 48.63);
  --card-foreground: oklch(0.797 0 180);
  --border: oklch(0.341 0 158.199);
  --input: oklch(0.371 0 168.69);
  --primary: oklch(0.757 0 180);
  --primary-foreground: oklch(0.204 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.437 0.005 48.61);
  --accent-foreground: oklch(0.939 0.001 48.737);
  --destructive: oklch(0.625 0.248 28.871);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.757 0 180);
  --chart-1: oklch(0.757 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.437 0.005 48.61);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.753 0.005 17.277);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.29 0.003 48.626);
  --foreground: oklch(0.757 0 180);
  --muted: oklch(0.33 0.014 48.263);
  --muted-foreground: oklch(0.772 0.016 48.506);
  --popover: oklch(0.259 0.003 48.632);
  --popover-foreground: oklch(0.837 0 171.254);
  --card: oklch(0.269 0.003 48.63);
  --card-foreground: oklch(0.797 0 180);
  --border: oklch(0.341 0 158.199);
  --input: oklch(0.371 0 168.69);
  --primary: oklch(0.757 0 180);
  --primary-foreground: oklch(0.204 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.437 0.005 48.61);
  --accent-foreground: oklch(0.939 0.001 48.737);
  --destructive: oklch(0.625 0.248 28.871);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.757 0 180);
  --chart-1: oklch(0.757 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.437 0.005 48.61);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.753 0.005 17.277);
}