Courteous for shadcn/ui

Courteous is a shadcn/ui theme built around a muted light green primary color (#f4f4f0) with muted light purple accents (#f4f0f4). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light green primary (#f4f4f0) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#ffffffwhite
#070703black
Foreground
#121505black
#fbfcf8snow
Card
#fcfcfcsnow
#0a0b05black
Card foreground
#0f1104black
#fdfdfcwhite
Popover
#ffffffwhite
#070703black
Popover foreground
#121505black
#fbfcf8snow
Primary
#f4f4f0whitesmoke
#f4f4f0whitesmoke
Primary foreground
#2a2c21darkslategray
#2a2c21darkslategray
Secondary
#f0f4f4whitesmoke
#f0f4f4whitesmoke
Secondary foreground
#212a2cdarkslategray
#212a2cdarkslategray
Muted
#deeaedlavender
#121e21black
Muted foreground
#414748darkslategray
#b7bdbesilver
Accent
#f4f0f4whitesmoke
#f4f0f4whitesmoke
Accent foreground
#674c63dimgray
#674c63dimgray
Destructive
#931f0bdarkred
#df3011orangered
Destructive foreground
#fcdad4mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f4f4f0whitesmoke
#f4f4f0whitesmoke

Contrast

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

Light mode
Text on background18.49:1AAA
Text on card18.64:1AAA
Primary button12.86:1AAA
Secondary button13.20:1AAA
Muted text7.73:1AAA
Accent6.68:1AA
Destructive6.58:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.44:1AAA
Primary button12.86:1AAA
Secondary button13.20:1AAA
Muted text8.90:1AAA
Accent6.68:1AA
Destructive4.60:1AA

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.187 0.031 116.082);
  --muted: oklch(0.93 0.013 209.437);
  --muted-foreground: oklch(0.394 0.008 209.431);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.187 0.031 116.082);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.169 0.027 115.571);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.966 0.005 113.404);
  --primary-foreground: oklch(0.287 0.02 114.615);
  --secondary: oklch(0.964 0.004 209.458);
  --secondary-foreground: oklch(0.278 0.014 209.474);
  --accent: oklch(0.96 0.006 330.326);
  --accent-foreground: oklch(0.453 0.05 331.594);
  --destructive: oklch(0.435 0.154 32.151);
  --destructive-foreground: oklch(0.915 0.038 29.672);
  --ring: oklch(0.966 0.005 113.404);
  --chart-1: oklch(0.966 0.005 113.404);
  --chart-2: oklch(0.964 0.004 209.458);
  --chart-3: oklch(0.96 0.006 330.326);
  --chart-4: oklch(0.985 0.001 209.464);
  --chart-5: oklch(0.967 0.006 113.424);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.013 114.02);
  --foreground: oklch(0.989 0.005 113.4);
  --muted: oklch(0.227 0.018 209.653);
  --muted-foreground: oklch(0.793 0.007 209.447);
  --popover: oklch(0.126 0.013 114.02);
  --popover-foreground: oklch(0.989 0.005 113.4);
  --card: oklch(0.144 0.015 114.083);
  --card-foreground: oklch(0.994 0.002 113.353);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.966 0.005 113.404);
  --primary-foreground: oklch(0.287 0.02 114.615);
  --secondary: oklch(0.964 0.004 209.458);
  --secondary-foreground: oklch(0.278 0.014 209.474);
  --accent: oklch(0.96 0.006 330.326);
  --accent-foreground: oklch(0.453 0.05 331.594);
  --destructive: oklch(0.588 0.214 31.964);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.966 0.005 113.404);
  --chart-1: oklch(0.966 0.005 113.404);
  --chart-2: oklch(0.964 0.004 209.458);
  --chart-3: oklch(0.96 0.006 330.326);
  --chart-4: oklch(0.985 0.001 209.464);
  --chart-5: oklch(0.967 0.006 113.424);
}