OH Sub for shadcn/ui

OH Sub is a shadcn/ui theme built around a blue primary color (#3b4378) with muted light blue accents (#eaebf1). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#3b4378) on a blue-tinted background (#050610).

Color palette

TokenLightDark
Background
#ffffffwhite
#050610black
Foreground
#030511black
#ffffffwhite
Card
#ffffffwhite
#050610black
Card foreground
#030511black
#ffffffwhite
Popover
#ffffffwhite
#050610black
Popover foreground
#030511black
#ffffffwhite
Primary
#3b4378darkslateblue
#3b4378darkslateblue
Primary foreground
#eeeff7whitesmoke
#eeeff7whitesmoke
Secondary
#ec6b05chocolate
#ec6b05chocolate
Secondary foreground
#eeeff7whitesmoke
#eeeff7whitesmoke
Muted
#e5e9fflavender
#13162ablack
Muted foreground
#575a70dimgray
#8f92a8lightslategray
Accent
#eaebf1lavender
#282a3fdarkslategray
Accent foreground
#2c2c2fdarkslategray
#f8fafcghostwhite
Destructive
#e01300red
#f51400red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e3e4e8gainsboro
#202127black
Input
#e3e4e8gainsboro
#202127black
Ring
#3b4378darkslateblue
#3b4378darkslateblue

Contrast

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

Light mode
Text on background20.31:1AAA
Text on card20.31:1AAA
Primary button8.11:1AAA
Secondary button2.74:1Fail
Muted text5.61:1AA
Accent11.70:1AAA
Destructive4.91:1AA
Dark mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button8.11:1AAA
Secondary button2.74:1Fail
Muted text5.80:1AA
Accent13.49:1AAA
Destructive4.21:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.121 0.03 271.255);
  --muted: oklch(0.937 0.03 278.834);
  --muted-foreground: oklch(0.473 0.036 278.06);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.121 0.03 271.255);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.121 0.03 271.255);
  --border: oklch(0.919 0.005 279.252);
  --input: oklch(0.919 0.005 279.252);
  --primary: oklch(0.402 0.089 275.092);
  --primary-foreground: oklch(0.954 0.01 279.18);
  --secondary: oklch(0.674 0.182 48.023);
  --secondary-foreground: oklch(0.954 0.011 280.47);
  --accent: oklch(0.941 0.008 278.634);
  --accent-foreground: oklch(0.294 0.005 286.064);
  --destructive: oklch(0.575 0.23 30.091);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.402 0.089 275.092);
  --chart-1: oklch(0.402 0.089 275.092);
  --chart-2: oklch(0.674 0.182 48.023);
  --chart-3: oklch(0.941 0.008 278.634);
  --chart-4: oklch(0.704 0.19 48.083);
  --chart-5: oklch(0.398 0.097 274.576);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.022 274.061);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.209 0.039 275.851);
  --muted-foreground: oklch(0.665 0.033 278.535);
  --popover: oklch(0.128 0.022 274.061);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.128 0.022 274.061);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.251 0.011 278.672);
  --input: oklch(0.251 0.011 278.672);
  --primary: oklch(0.402 0.089 275.092);
  --primary-foreground: oklch(0.954 0.01 279.18);
  --secondary: oklch(0.674 0.182 48.023);
  --secondary-foreground: oklch(0.954 0.011 280.47);
  --accent: oklch(0.292 0.038 279.33);
  --accent-foreground: oklch(0.984 0.003 247.859);
  --destructive: oklch(0.613 0.246 30.028);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.402 0.089 275.092);
  --chart-1: oklch(0.402 0.089 275.092);
  --chart-2: oklch(0.674 0.182 48.023);
  --chart-3: oklch(0.292 0.038 279.33);
  --chart-4: oklch(0.704 0.19 48.083);
  --chart-5: oklch(0.398 0.097 274.576);
}