Coarse for shadcn/ui

Coarse is a shadcn/ui theme built around a deep yellow primary color (#817612) with muted light yellow accents (#cfcdb9). The light mode uses a neutral background (#fdfcf7). Dark mode keeps the deep yellow primary (#817612) on a yellow-tinted background (#0c0b03).

Color palette

TokenLightDark
Background
#fdfcf7snow
#0c0b03black
Foreground
#090801black
#ffffffwhite
Card
#fcfbf3floralwhite
#100f04black
Card foreground
#050401black
#ffffffwhite
Popover
#fdfcf7snow
#0c0b03black
Popover foreground
#090801black
#ffffffwhite
Primary
#817612olive
#817612olive
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#deddd3gainsboro
#292923darkslategray
Secondary foreground
#494737darkslategray
#c4c3basilver
Muted
#ecece9linen
#161613black
Muted foreground
#5f5e54dimgray
#abaaa0darkgray
Accent
#cfcdb9silver
#4b4835darkolivegreen
Accent foreground
#343223darkslategray
#dfded2gainsboro
Destructive
#60130bmaroon
#e6321eorangered
Destructive foreground
#f5b0a8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#817612olive
#817612olive

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.73:1AAA
Primary button4.60:1AA
Secondary button6.87:1AA
Muted text5.50:1AA
Accent8.07:1AAA
Destructive7.28:1AAA
Dark mode
Text on background19.70:1AAA
Text on card19.22:1AAA
Primary button4.60:1AA
Secondary button8.27:1AAA
Muted text7.78:1AAA
Accent6.79:1AA
Destructive4.33: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.991 0.007 101.399);
  --foreground: oklch(0.133 0.023 105.362);
  --muted: oklch(0.942 0.003 101.345);
  --muted-foreground: oklch(0.478 0.015 101.771);
  --popover: oklch(0.991 0.007 101.399);
  --popover-foreground: oklch(0.133 0.023 105.362);
  --card: oklch(0.986 0.011 101.456);
  --card-foreground: oklch(0.106 0.018 105.362);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.56 0.112 102.458);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.896 0.013 101.515);
  --secondary-foreground: oklch(0.394 0.026 102.237);
  --accent: oklch(0.845 0.027 101.78);
  --accent-foreground: oklch(0.314 0.025 102.41);
  --destructive: oklch(0.324 0.111 30.321);
  --destructive-foreground: oklch(0.819 0.083 26.134);
  --ring: oklch(0.56 0.112 102.458);
  --chart-1: oklch(0.56 0.112 102.458);
  --chart-2: oklch(0.896 0.013 101.515);
  --chart-3: oklch(0.845 0.027 101.78);
  --chart-4: oklch(0.917 0.01 101.465);
  --chart-5: oklch(0.566 0.114 102.361);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.148 0.02 104.176);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.197 0.005 101.682);
  --muted-foreground: oklch(0.736 0.014 101.576);
  --popover: oklch(0.148 0.02 104.176);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.166 0.023 103.607);
  --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.56 0.112 102.458);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.278 0.01 101.827);
  --secondary-foreground: oklch(0.816 0.013 101.53);
  --accent: oklch(0.4 0.031 102.386);
  --accent-foreground: oklch(0.898 0.016 101.561);
  --destructive: oklch(0.603 0.218 30.489);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.56 0.112 102.458);
  --chart-1: oklch(0.56 0.112 102.458);
  --chart-2: oklch(0.278 0.01 101.827);
  --chart-3: oklch(0.4 0.031 102.386);
  --chart-4: oklch(0.311 0.012 101.849);
  --chart-5: oklch(0.566 0.114 102.361);
}