Dignity for shadcn/ui

Dignity is a shadcn/ui theme built around a muted green primary color (#3d614b) with muted orange accents (#614b3d). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#3d614b) on a green-tinted background (#040c07).

Color palette

TokenLightDark
Background
#ffffffwhite
#040c07black
Foreground
#020904black
#f9fbfamintcream
Card
#fcfcfcsnow
#051009black
Card foreground
#010402black
#fcfdfcwhite
Popover
#fcfcfcsnow
#051009black
Popover foreground
#010402black
#fcfdfcwhite
Primary
#3d614bdarkslategray
#3d614bdarkslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#4b3d61darkslategray
#4b3d61darkslategray
Secondary foreground
#e7e3edlavender
#e7e3edlavender
Muted
#dddce0gainsboro
#211f23black
Muted foreground
#4f4f4fdarkslategray
#b0b0b0darkgray
Accent
#614b3ddarkolivegreen
#614b3ddarkolivegreen
Accent foreground
#ede7e3linen
#ede7e3linen
Destructive
#c7360afirebrick
#f35120orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3d614bdarkslategray
#3d614bdarkslategray

Contrast

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

Light mode
Text on background20.12:1AAA
Text on card20.15:1AAA
Primary button6.96:1AA
Secondary button7.77:1AAA
Muted text6.01:1AA
Accent6.64:1AA
Destructive5.30:1AA
Dark mode
Text on background19.09:1AAA
Text on card19.04:1AAA
Primary button6.96:1AA
Secondary button7.77:1AAA
Muted text7.51:1AAA
Accent6.64:1AA
Destructive3.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.125 0.021 159.262);
  --muted: oklch(0.897 0.005 303.562);
  --muted-foreground: oklch(0.428 0 180);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.099 0.017 159.262);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.099 0.017 159.262);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.459 0.056 156.355);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.39 0.062 301.187);
  --secondary-foreground: oklch(0.921 0.015 303.402);
  --accent: oklch(0.432 0.038 53.311);
  --accent-foreground: oklch(0.931 0.009 54.373);
  --destructive: oklch(0.55 0.187 35.076);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.459 0.056 156.355);
  --chart-1: oklch(0.459 0.056 156.355);
  --chart-2: oklch(0.39 0.062 301.187);
  --chart-3: oklch(0.432 0.038 53.311);
  --chart-4: oklch(0.415 0.067 301.148);
  --chart-5: oklch(0.464 0.062 155.951);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.019 159.137);
  --foreground: oklch(0.986 0.002 159.423);
  --muted: oklch(0.244 0.006 303.247);
  --muted-foreground: oklch(0.757 0 180);
  --popover: oklch(0.157 0.022 157.869);
  --popover-foreground: oklch(0.993 0.001 159.446);
  --card: oklch(0.157 0.022 157.869);
  --card-foreground: oklch(0.993 0.001 159.446);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.459 0.056 156.355);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.39 0.062 301.187);
  --secondary-foreground: oklch(0.921 0.015 303.402);
  --accent: oklch(0.432 0.038 53.311);
  --accent-foreground: oklch(0.931 0.009 54.373);
  --destructive: oklch(0.654 0.206 36.187);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.459 0.056 156.355);
  --chart-1: oklch(0.459 0.056 156.355);
  --chart-2: oklch(0.39 0.062 301.187);
  --chart-3: oklch(0.432 0.038 53.311);
  --chart-4: oklch(0.415 0.067 301.148);
  --chart-5: oklch(0.464 0.062 155.951);
}