Stain for shadcn/ui

Stain is a shadcn/ui theme built around a vivid light blue primary color (#9fcbf4) with muted light blue accents (#bccad7). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light blue primary (#9fcbf4) on a blue-tinted background (#04080b).

Color palette

TokenLightDark
Background
#ffffffwhite
#04080bblack
Foreground
#000000black
#ffffffwhite
Card
#fcfcfcsnow
#060a0fblack
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#060a0fblack
Popover foreground
#000000black
#ffffffwhite
Primary
#9fcbf4lightblue
#9fcbf4lightblue
Primary foreground
#0a3257midnightblue
#0a3257midnightblue
Secondary
#d2d9dfgainsboro
#191a1ablack
Secondary foreground
#35404bdarkslategray
#b1b3b4darkgray
Muted
#f1f2f4whitesmoke
#0b0d0eblack
Muted foreground
#3b454fdarkslategray
#b0bac4silver
Accent
#bccad7lightsteelblue
#272c30darkslategray
Accent foreground
#24313ddarkslategray
#bec5cbsilver
Destructive
#df2407orangered
#f83d20orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9fcbf4lightblue
#9fcbf4lightblue

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.65:1AAA
Secondary button7.41:1AAA
Muted text8.72:1AAA
Accent7.93:1AAA
Destructive4.79:1AA
Dark mode
Text on background20.11:1AAA
Text on card19.83:1AAA
Primary button7.65:1AAA
Secondary button8.31:1AAA
Muted text9.89:1AAA
Accent8.13:1AAA
Destructive3.69:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.961 0.003 246);
  --muted-foreground: oklch(0.386 0.022 246.618);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.825 0.075 247.039);
  --primary-foreground: oklch(0.311 0.08 251.084);
  --secondary: oklch(0.882 0.011 246.114);
  --secondary-foreground: oklch(0.366 0.023 246.698);
  --accent: oklch(0.832 0.024 246.29);
  --accent-foreground: oklch(0.306 0.027 247.009);
  --destructive: oklch(0.579 0.221 31.118);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.825 0.075 247.039);
  --chart-1: oklch(0.825 0.075 247.039);
  --chart-2: oklch(0.882 0.011 246.114);
  --chart-3: oklch(0.832 0.024 246.29);
  --chart-4: oklch(0.906 0.009 246.081);
  --chart-5: oklch(0.825 0.078 247.084);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.011 239.91);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.157 0.004 246.289);
  --muted-foreground: oklch(0.785 0.019 246.236);
  --popover: oklch(0.143 0.013 243.2);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.143 0.013 243.2);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.825 0.075 247.039);
  --primary-foreground: oklch(0.311 0.08 251.084);
  --secondary: oklch(0.215 0.001 246.034);
  --secondary-foreground: oklch(0.764 0.003 246.008);
  --accent: oklch(0.288 0.011 246.399);
  --accent-foreground: oklch(0.819 0.011 246.127);
  --destructive: oklch(0.643 0.226 31.629);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.825 0.075 247.039);
  --chart-1: oklch(0.825 0.075 247.039);
  --chart-2: oklch(0.215 0.001 246.034);
  --chart-3: oklch(0.288 0.011 246.399);
  --chart-4: oklch(0.248 0.002 246.04);
  --chart-5: oklch(0.825 0.078 247.084);
}