Coarse for shadcn/ui

Coarse is a shadcn/ui theme built around a vivid light blue primary color (#e1e6fe) with vivid light yellow accents (#fef9e1). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light blue primary (#e1e6fe) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#ffffffwhite
#030407black
Foreground
#02040dblack
#f6f7f8whitesmoke
Card
#fcfcfcsnow
#05060bblack
Card foreground
#010309black
#f9f9fbghostwhite
Popover
#ffffffwhite
#030407black
Popover foreground
#02040dblack
#f6f7f8whitesmoke
Primary
#e1e6felavender
#e1e6felavender
Primary foreground
#0621a7darkblue
#0621a7darkblue
Secondary
#fef9e1cornsilk
#fef9e1cornsilk
Secondary foreground
#453a02darkolivegreen
#453a02darkolivegreen
Muted
#eceadfbeige
#201e13black
Muted foreground
#59584fdimgray
#b0aea6darkgray
Accent
#fef9e1cornsilk
#fef9e1cornsilk
Accent foreground
#453a02darkolivegreen
#453a02darkolivegreen
Destructive
#893206saddlebrown
#f6702ctomato
Destructive foreground
#fdd7c4peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e1e6felavender
#e1e6felavender

Contrast

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

Light mode
Text on background20.47:1AAA
Text on card20.17:1AAA
Primary button9.52:1AAA
Secondary button10.69:1AAA
Muted text5.93:1AA
Accent10.69:1AAA
Destructive6.23:1AA
Dark mode
Text on background19.12:1AAA
Text on card19.28:1AAA
Primary button9.52:1AAA
Secondary button10.69:1AAA
Muted text7.51:1AAA
Accent10.69:1AAA
Destructive7.26:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.109 0.027 267.275);
  --muted: oklch(0.936 0.015 97.476);
  --muted-foreground: oklch(0.458 0.013 97.633);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.109 0.027 267.275);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.095 0.023 267.061);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.929 0.033 276.752);
  --primary-foreground: oklch(0.359 0.209 264.889);
  --secondary: oklch(0.98 0.031 97.663);
  --secondary-foreground: oklch(0.349 0.07 96.664);
  --accent: oklch(0.98 0.031 97.663);
  --accent-foreground: oklch(0.349 0.07 96.664);
  --destructive: oklch(0.437 0.129 41.416);
  --destructive-foreground: oklch(0.906 0.049 48.155);
  --ring: oklch(0.929 0.033 276.752);
  --chart-1: oklch(0.929 0.033 276.752);
  --chart-2: oklch(0.98 0.031 97.663);
  --chart-3: oklch(0.98 0.031 97.663);
  --chart-4: oklch(0.99 0.016 97.468);
  --chart-5: oklch(0.928 0.034 276.734);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.106 0.011 273.25);
  --foreground: oklch(0.975 0.002 277.228);
  --muted: oklch(0.234 0.021 98.182);
  --muted-foreground: oklch(0.75 0.012 97.469);
  --popover: oklch(0.106 0.011 273.25);
  --popover-foreground: oklch(0.975 0.002 277.228);
  --card: oklch(0.122 0.013 273.259);
  --card-foreground: oklch(0.984 0.001 277.239);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.929 0.033 276.752);
  --primary-foreground: oklch(0.359 0.209 264.889);
  --secondary: oklch(0.98 0.031 97.663);
  --secondary-foreground: oklch(0.349 0.07 96.664);
  --accent: oklch(0.98 0.031 97.663);
  --accent-foreground: oklch(0.349 0.07 96.664);
  --destructive: oklch(0.697 0.182 43.736);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.929 0.033 276.752);
  --chart-1: oklch(0.929 0.033 276.752);
  --chart-2: oklch(0.98 0.031 97.663);
  --chart-3: oklch(0.98 0.031 97.663);
  --chart-4: oklch(0.99 0.016 97.468);
  --chart-5: oklch(0.928 0.034 276.734);
}