Coarse for shadcn/ui

Coarse is a shadcn/ui theme built around a muted deep green primary color (#2a2f1e) with muted deep green accents (#212f1e). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#2a2f1e) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#ffffffwhite
#030401black
Foreground
#101505black
#fbfbf8snow
Card
#fcfcfcsnow
#060802black
Card foreground
#0d1104black
#fdfdfcwhite
Popover
#ffffffwhite
#030401black
Popover foreground
#101505black
#fbfbf8snow
Primary
#2a2f1edarkslategray
#2a2f1edarkslategray
Primary foreground
#c5cdb1silver
#c5cdb1silver
Secondary
#2f2b1edarkslategray
#2f2b1edarkslategray
Secondary foreground
#cdc7b1silver
#cdc7b1silver
Muted
#f5f4efwhitesmoke
#100e0ablack
Muted foreground
#5a5544darkolivegreen
#bbb6a5darkgray
Accent
#212f1edarkslategray
#212f1edarkslategray
Accent foreground
#b7cdb1silver
#b7cdb1silver
Destructive
#ba4512firebrick
#d14d15chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2a2f1edarkslategray
#2a2f1edarkslategray

Contrast

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

Light mode
Text on background18.55:1AAA
Text on card18.69:1AAA
Primary button8.39:1AAA
Secondary button8.35:1AAA
Muted text6.76:1AA
Accent8.33:1AAA
Destructive5.34:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.75:1AAA
Primary button8.39:1AAA
Secondary button8.35:1AAA
Muted text9.49:1AAA
Accent8.33:1AAA
Destructive4.39:1AA Large

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.185 0.032 121.892);
  --muted: oklch(0.966 0.006 93.932);
  --muted-foreground: oklch(0.45 0.028 94.392);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.185 0.032 121.892);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.168 0.028 121.069);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.294 0.03 121.103);
  --primary-foreground: oklch(0.835 0.039 120.112);
  --secondary: oklch(0.289 0.023 94.471);
  --secondary-foreground: oklch(0.829 0.031 94.222);
  --accent: oklch(0.286 0.035 138.979);
  --accent-foreground: oklch(0.825 0.045 138.916);
  --destructive: oklch(0.544 0.162 39.885);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.294 0.03 121.103);
  --chart-1: oklch(0.294 0.03 121.103);
  --chart-2: oklch(0.289 0.023 94.471);
  --chart-3: oklch(0.286 0.035 138.979);
  --chart-4: oklch(0.323 0.027 94.48);
  --chart-5: oklch(0.297 0.033 121.324);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.015 119.277);
  --foreground: oklch(0.988 0.004 119.371);
  --muted: oklch(0.165 0.009 94.345);
  --muted-foreground: oklch(0.776 0.025 94.178);
  --popover: oklch(0.103 0.015 119.277);
  --popover-foreground: oklch(0.988 0.004 119.371);
  --card: oklch(0.129 0.019 119.277);
  --card-foreground: oklch(0.994 0.002 119.337);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.294 0.03 121.103);
  --primary-foreground: oklch(0.835 0.039 120.112);
  --secondary: oklch(0.289 0.023 94.471);
  --secondary-foreground: oklch(0.829 0.031 94.222);
  --accent: oklch(0.286 0.035 138.979);
  --accent-foreground: oklch(0.825 0.045 138.916);
  --destructive: oklch(0.593 0.178 39.727);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.294 0.03 121.103);
  --chart-1: oklch(0.294 0.03 121.103);
  --chart-2: oklch(0.289 0.023 94.471);
  --chart-3: oklch(0.286 0.035 138.979);
  --chart-4: oklch(0.323 0.027 94.48);
  --chart-5: oklch(0.297 0.033 121.324);
}