Coarse for shadcn/ui

Coarse is a shadcn/ui theme built around a deep blue primary color (#252b5f) with muted light blue accents (#bcbdc7). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the deep blue primary (#252b5f) on a blue-tinted background (#06070e).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#06070eblack
Foreground
#050714black
#f5f5fawhitesmoke
Card
#f8f8fcghostwhite
#06070eblack
Card foreground
#050714black
#f5f5fawhitesmoke
Popover
#f8f8fcghostwhite
#06070eblack
Popover foreground
#050714black
#f5f5fawhitesmoke
Primary
#252b5fmidnightblue
#252b5fmidnightblue
Primary foreground
#cccfeblightgrey
#cccfeblightgrey
Secondary
#d0d0d2lightgrey
#282a39darkslategray
Secondary foreground
#373739darkslategray
#c0c2d3silver
Muted
#eaebf5lavender
#0a0b15black
Muted foreground
#515361dimgray
#9e9faedarkgray
Accent
#bcbdc7silver
#313554darkslategray
Accent foreground
#25262cdarkslategray
#d2d4e5gainsboro
Destructive
#8f0e04darkred
#f81c0dred
Destructive foreground
#fdccc9pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#252b5fmidnightblue
#252b5fmidnightblue

Contrast

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

Light mode
Text on background18.96:1AAA
Text on card18.96:1AAA
Primary button8.60:1AAA
Secondary button7.73:1AAA
Muted text6.42:1AA
Accent8.10:1AAA
Destructive6.54:1AA
Dark mode
Text on background18.51:1AAA
Text on card18.51:1AAA
Primary button8.60:1AAA
Secondary button8.04:1AAA
Muted text7.49:1AAA
Accent8.12:1AAA
Destructive4.07:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 281.209);
  --foreground: oklch(0.134 0.031 275.167);
  --muted: oklch(0.943 0.014 281.049);
  --muted-foreground: oklch(0.446 0.024 280.379);
  --popover: oklch(0.981 0.005 281.209);
  --popover-foreground: oklch(0.134 0.031 275.167);
  --card: oklch(0.981 0.005 281.209);
  --card-foreground: oklch(0.134 0.031 275.167);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.315 0.092 275.014);
  --primary-foreground: oklch(0.86 0.039 280.514);
  --secondary: oklch(0.859 0.002 281.244);
  --secondary-foreground: oklch(0.338 0.004 281.118);
  --accent: oklch(0.802 0.014 281.003);
  --accent-foreground: oklch(0.27 0.012 280.518);
  --destructive: oklch(0.415 0.162 29.921);
  --destructive-foreground: oklch(0.887 0.056 23.03);
  --ring: oklch(0.315 0.092 275.014);
  --chart-1: oklch(0.315 0.092 275.014);
  --chart-2: oklch(0.859 0.002 281.244);
  --chart-3: oklch(0.802 0.014 281.003);
  --chart-4: oklch(0.883 0.002 281.253);
  --chart-5: oklch(0.312 0.098 274.409);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.131 0.018 277.516);
  --foreground: oklch(0.972 0.007 281.177);
  --muted: oklch(0.153 0.022 278.591);
  --muted-foreground: oklch(0.707 0.021 280.793);
  --popover: oklch(0.131 0.018 277.516);
  --popover-foreground: oklch(0.972 0.007 281.177);
  --card: oklch(0.131 0.018 277.516);
  --card-foreground: oklch(0.972 0.007 281.177);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.315 0.092 275.014);
  --primary-foreground: oklch(0.86 0.039 280.514);
  --secondary: oklch(0.289 0.027 279.61);
  --secondary-foreground: oklch(0.818 0.023 280.822);
  --accent: oklch(0.339 0.055 278.207);
  --accent-foreground: oklch(0.873 0.023 280.851);
  --destructive: oklch(0.621 0.245 29.757);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.315 0.092 275.014);
  --chart-1: oklch(0.315 0.092 275.014);
  --chart-2: oklch(0.289 0.027 279.61);
  --chart-3: oklch(0.339 0.055 278.207);
  --chart-4: oklch(0.317 0.031 279.546);
  --chart-5: oklch(0.312 0.098 274.409);
}