Respectful for shadcn/ui

Respectful is a shadcn/ui theme built around a deep green primary color (#1a2310) with neutral gray accents (#dee0dc). The light mode uses a neutral background (#fafdf7). Dark mode keeps the deep green primary (#1a2310) on a green-tinted background (#0a0e06).

Color palette

TokenLightDark
Background
#fafdf7mintcream
#0a0e06black
Foreground
#0d1603black
#fcfdfcwhite
Card
#fafdf7mintcream
#0a0e06black
Card foreground
#0d1603black
#fcfdfcwhite
Popover
#fafdf7mintcream
#0a0e06black
Popover foreground
#0d1603black
#fcfdfcwhite
Primary
#1a2310black
#1a2310black
Primary foreground
#81b14eyellowgreen
#81b14eyellowgreen
Secondary
#dee0dcgainsboro
#2e302cdarkslategray
Secondary foreground
#454941darkslategray
#c7cac4silver
Muted
#ebece9linen
#141613black
Muted foreground
#616a58dimgray
#9ea795darkgray
Accent
#dee0dcgainsboro
#2e302cdarkslategray
Accent foreground
#454941darkslategray
#c7cac4silver
Destructive
#cb4b0bchocolate
#f4702ftomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1a2310black
#1a2310black

Contrast

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

Light mode
Text on background18.03:1AAA
Text on card18.03:1AAA
Primary button6.42:1AA
Secondary button6.91:1AA
Muted text4.77:1AA
Accent6.91:1AA
Destructive4.60:1AA
Dark mode
Text on background19.05:1AAA
Text on card19.05:1AAA
Primary button6.42:1AA
Secondary button8.03:1AAA
Muted text7.28:1AAA
Accent8.03:1AAA
Destructive7.22:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.008 127.888);
  --foreground: oklch(0.186 0.04 129.477);
  --muted: oklch(0.942 0.005 127.847);
  --muted-foreground: oklch(0.51 0.029 128.467);
  --popover: oklch(0.99 0.008 127.888);
  --popover-foreground: oklch(0.186 0.04 129.477);
  --card: oklch(0.99 0.008 127.888);
  --card-foreground: oklch(0.186 0.04 129.477);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.243 0.038 129.902);
  --primary-foreground: oklch(0.705 0.14 130.736);
  --secondary: oklch(0.904 0.006 127.864);
  --secondary-foreground: oklch(0.399 0.015 128.223);
  --accent: oklch(0.904 0.006 127.864);
  --accent-foreground: oklch(0.399 0.015 128.223);
  --destructive: oklch(0.581 0.175 40.781);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.243 0.038 129.902);
  --chart-1: oklch(0.243 0.038 129.902);
  --chart-2: oklch(0.904 0.006 127.864);
  --chart-3: oklch(0.904 0.006 127.864);
  --chart-4: oklch(0.926 0.004 127.845);
  --chart-5: oklch(0.245 0.04 130.062);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.019 128.165);
  --foreground: oklch(0.994 0.002 127.815);
  --muted: oklch(0.197 0.007 128.202);
  --muted-foreground: oklch(0.716 0.027 128.23);
  --popover: oklch(0.158 0.019 128.165);
  --popover-foreground: oklch(0.994 0.002 127.815);
  --card: oklch(0.158 0.019 128.165);
  --card-foreground: oklch(0.994 0.002 127.815);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.243 0.038 129.902);
  --primary-foreground: oklch(0.705 0.14 130.736);
  --secondary: oklch(0.306 0.009 128.124);
  --secondary-foreground: oklch(0.834 0.008 127.905);
  --accent: oklch(0.306 0.009 128.124);
  --accent-foreground: oklch(0.834 0.008 127.905);
  --destructive: oklch(0.695 0.179 43.953);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.243 0.038 129.902);
  --chart-1: oklch(0.243 0.038 129.902);
  --chart-2: oklch(0.306 0.009 128.124);
  --chart-3: oklch(0.306 0.009 128.124);
  --chart-4: oklch(0.337 0.01 128.135);
  --chart-5: oklch(0.245 0.04 130.062);
}