Courteous for shadcn/ui

Courteous is a shadcn/ui theme built around a neutral gray primary color (#393c3a) with neutral gray accents (#3c3a39). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#393c3a) on a green-tinted background (#030c07).

Color palette

TokenLightDark
Background
#ffffffwhite
#030c07black
Foreground
#041009black
#fcfdfcwhite
Card
#ffffffwhite
#030c07black
Card foreground
#041009black
#fcfdfcwhite
Popover
#ffffffwhite
#030c07black
Popover foreground
#041009black
#fcfdfcwhite
Primary
#393c3adarkslategray
#393c3adarkslategray
Primary foreground
#d3d5d4lightgrey
#d3d5d4lightgrey
Secondary
#3a393cdarkslategray
#3a393cdarkslategray
Secondary foreground
#d4d3d5lightgrey
#d4d3d5lightgrey
Muted
#dbd6e1gainsboro
#231e29black
Muted foreground
#4e4a54darkslategray
#afabb5darkgray
Accent
#3c3a39darkslategray
#3c3a39darkslategray
Accent foreground
#d5d4d3lightgrey
#d5d4d3lightgrey
Destructive
#722109maroon
#da3f10orangered
Destructive foreground
#f9c3b3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#393c3adarkslategray
#393c3adarkslategray

Contrast

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

Light mode
Text on background19.38:1AAA
Text on card19.38:1AAA
Primary button7.56:1AAA
Secondary button7.64:1AAA
Muted text6.03:1AA
Accent7.60:1AAA
Destructive6.96:1AA
Dark mode
Text on background19.41:1AAA
Text on card19.41:1AAA
Primary button7.56:1AAA
Secondary button7.64:1AAA
Muted text7.22:1AAA
Accent7.60:1AAA
Destructive4.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.158 0.023 159.971);
  --muted: oklch(0.882 0.016 305.493);
  --muted-foreground: oklch(0.418 0.016 305.218);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.158 0.023 159.971);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.158 0.023 159.971);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.353 0.004 161.539);
  --primary-foreground: oklch(0.87 0.002 161.744);
  --secondary: oklch(0.348 0.004 305.577);
  --secondary-foreground: oklch(0.867 0.002 305.701);
  --accent: oklch(0.351 0.003 60.184);
  --accent-foreground: oklch(0.869 0.001 60.26);
  --destructive: oklch(0.373 0.118 36.166);
  --destructive-foreground: oklch(0.862 0.066 37.595);
  --ring: oklch(0.353 0.004 161.539);
  --chart-1: oklch(0.353 0.004 161.539);
  --chart-2: oklch(0.348 0.004 305.577);
  --chart-3: oklch(0.351 0.003 60.184);
  --chart-4: oklch(0.377 0.005 305.574);
  --chart-5: oklch(0.356 0.01 161.135);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.021 161.449);
  --foreground: oklch(0.993 0.001 161.787);
  --muted: oklch(0.246 0.022 304.517);
  --muted-foreground: oklch(0.748 0.014 305.488);
  --popover: oklch(0.142 0.021 161.449);
  --popover-foreground: oklch(0.993 0.001 161.787);
  --card: oklch(0.142 0.021 161.449);
  --card-foreground: oklch(0.993 0.001 161.787);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.353 0.004 161.539);
  --primary-foreground: oklch(0.87 0.002 161.744);
  --secondary: oklch(0.348 0.004 305.577);
  --secondary-foreground: oklch(0.867 0.002 305.701);
  --accent: oklch(0.351 0.003 60.184);
  --accent-foreground: oklch(0.869 0.001 60.26);
  --destructive: oklch(0.593 0.198 35.387);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.353 0.004 161.539);
  --chart-1: oklch(0.353 0.004 161.539);
  --chart-2: oklch(0.348 0.004 305.577);
  --chart-3: oklch(0.351 0.003 60.184);
  --chart-4: oklch(0.377 0.005 305.574);
  --chart-5: oklch(0.356 0.01 161.135);
}