Box UK Contrast (rainglow) for shadcn/ui

Box UK Contrast (rainglow) is a shadcn/ui theme built around a near-white primary color (#ffffff) with muted deep blue accents (#303b46). The light mode uses a blue-tinted background (#111418). Dark mode keeps the near-white primary (#ffffff) on a blue-tinted background (#111418).

Color palette

TokenLightDark
Background
#111418black
#111418black
Foreground
#ffffffwhite
#ffffffwhite
Card
#0c0f12black
#0c0f12black
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#0a0d0fblack
#0a0d0fblack
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#22262bdarkslategray
#22262bdarkslategray
Muted foreground
#9ba6b0darkgray
#9ba6b0darkgray
Accent
#303b46darkslategray
#303b46darkslategray
Accent foreground
#cbd4dclightgrey
#cbd4dclightgrey
Destructive
#fa2d29crimson
#fa2d29crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#1e2124black
#1e2124black
Input
#25292cdarkslategray
#25292cdarkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background18.43:1AAA
Text on card19.17:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.13:1AA
Accent7.64:1AAA
Destructive3.85:1AA Large
Dark mode
Text on background18.43:1AAA
Text on card19.17:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.13:1AA
Accent7.64:1AAA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.191 0.01 248.348);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.267 0.011 248.233);
  --muted-foreground: oklch(0.719 0.02 248.103);
  --popover: oklch(0.156 0.007 248.245);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.168 0.008 248.285);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.247 0.007 248.12);
  --input: oklch(0.278 0.009 248.137);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.346 0.025 248.541);
  --accent-foreground: oklch(0.865 0.015 247.995);
  --destructive: oklch(0.634 0.237 27.929);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.346 0.025 248.541);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.191 0.01 248.348);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.267 0.011 248.233);
  --muted-foreground: oklch(0.719 0.02 248.103);
  --popover: oklch(0.156 0.007 248.245);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.168 0.008 248.285);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.247 0.007 248.12);
  --input: oklch(0.278 0.009 248.137);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.346 0.025 248.541);
  --accent-foreground: oklch(0.865 0.015 247.995);
  --destructive: oklch(0.634 0.237 27.929);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.346 0.025 248.541);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}