Cautious for shadcn/ui

Cautious is a shadcn/ui theme built around a green primary color (#577138) with violet accents (#513871). The light mode uses a neutral background (#fafdf7). Dark mode keeps the green primary (#577138) on a green-tinted background (#080b05).

Color palette

TokenLightDark
Background
#fafdf7mintcream
#080b05black
Foreground
#050802black
#ffffffwhite
Card
#f8fbf3whitesmoke
#0b0e06black
Card foreground
#030401black
#ffffffwhite
Popover
#f8fbf3whitesmoke
#0b0e06black
Popover foreground
#030401black
#ffffffwhite
Primary
#577138darkolivegreen
#577138darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#513871darkslateblue
#513871darkslateblue
Secondary foreground
#ede7f3lavender
#ede7f3lavender
Muted
#e5dfeclavender
#191320black
Muted foreground
#625671dimgray
#9a8ea9darkgray
Accent
#513871darkslateblue
#513871darkslateblue
Accent foreground
#ede7f3lavender
#ede7f3lavender
Destructive
#852705saddlebrown
#dd4108orangered
Destructive foreground
#fdcfbfpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#577138darkolivegreen
#577138darkolivegreen

Contrast

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

Light mode
Text on background19.59:1AAA
Text on card19.71:1AAA
Primary button5.50:1AA
Secondary button8.07:1AAA
Muted text5.22:1AA
Accent8.07:1AAA
Destructive6.49:1AA
Dark mode
Text on background19.83:1AAA
Text on card19.43:1AAA
Primary button5.50:1AA
Secondary button8.07:1AAA
Muted text5.88:1AA
Accent8.07:1AAA
Destructive4.33:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.008 126.528);
  --foreground: oklch(0.127 0.018 125.541);
  --muted: oklch(0.913 0.017 306.184);
  --muted-foreground: oklch(0.474 0.047 305.166);
  --popover: oklch(0.984 0.012 126.579);
  --popover-foreground: oklch(0.1 0.015 125.541);
  --card: oklch(0.984 0.012 126.579);
  --card-foreground: oklch(0.1 0.015 125.541);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.513 0.088 129.03);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.396 0.097 303.017);
  --secondary-foreground: oklch(0.936 0.017 306.194);
  --accent: oklch(0.396 0.097 303.017);
  --accent-foreground: oklch(0.936 0.017 306.194);
  --destructive: oklch(0.416 0.134 37.234);
  --destructive-foreground: oklch(0.891 0.056 40.958);
  --ring: oklch(0.513 0.088 129.03);
  --chart-1: oklch(0.513 0.088 129.03);
  --chart-2: oklch(0.396 0.097 303.017);
  --chart-3: oklch(0.396 0.097 303.017);
  --chart-4: oklch(0.42 0.104 302.965);
  --chart-5: oklch(0.519 0.095 129.255);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.016 125.775);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.201 0.025 304.8);
  --muted-foreground: oklch(0.666 0.043 305.605);
  --popover: oklch(0.158 0.019 126.962);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.158 0.019 126.962);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.513 0.088 129.03);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.396 0.097 303.017);
  --secondary-foreground: oklch(0.936 0.017 306.194);
  --accent: oklch(0.396 0.097 303.017);
  --accent-foreground: oklch(0.936 0.017 306.194);
  --destructive: oklch(0.6 0.201 36.221);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.513 0.088 129.03);
  --chart-1: oklch(0.513 0.088 129.03);
  --chart-2: oklch(0.396 0.097 303.017);
  --chart-3: oklch(0.396 0.097 303.017);
  --chart-4: oklch(0.42 0.104 302.965);
  --chart-5: oklch(0.519 0.095 129.255);
}