Tenet for shadcn/ui

Tenet is a shadcn/ui theme built around a green primary color (#5e8538) with green accents (#388538). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#5e8538) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#030401black
#f7f8f6whitesmoke
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#fafbf9snow
Popover
#ffffffwhite
#000000black
Popover foreground
#030401black
#f7f8f6whitesmoke
Primary
#5e8538olivedrab
#5e8538olivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#858538olivedrab
#858538olivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ebebe5linen
#1a1a14black
Muted foreground
#6f6f5ddimgray
#a2a290darkgray
Accent
#388538forestgreen
#388538forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#a23a11saddlebrown
#ea6b39tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5e8538olivedrab
#5e8538olivedrab

Contrast

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

Light mode
Text on background20.55:1AAA
Text on card20.54:1AAA
Primary button4.29:1AA Large
Secondary button3.88:1AA Large
Muted text4.27:1AA Large
Accent4.58:1AA
Destructive6.69:1AA
Dark mode
Text on background19.71:1AAA
Text on card19.92:1AAA
Primary button4.29:1AA Large
Secondary button3.88:1AA Large
Muted text6.75:1AA
Accent4.58:1AA
Destructive6.65:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.103 0.02 127.032);
  --muted: oklch(0.939 0.008 106.552);
  --muted-foreground: oklch(0.537 0.028 107.296);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.103 0.02 127.032);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.57 0.115 131.355);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.6 0.1 109.069);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.55 0.136 143.445);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.49 0.146 39.111);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.57 0.115 131.355);
  --chart-1: oklch(0.57 0.115 131.355);
  --chart-2: oklch(0.6 0.1 109.069);
  --chart-3: oklch(0.55 0.136 143.445);
  --chart-4: oklch(0.635 0.106 109.081);
  --chart-5: oklch(0.577 0.122 131.572);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.003 128.493);
  --muted: oklch(0.215 0.011 107.311);
  --muted-foreground: oklch(0.708 0.026 107.045);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.003 128.493);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.986 0.002 128.482);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.57 0.115 131.355);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.6 0.1 109.069);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.55 0.136 143.445);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.674 0.17 40.816);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.57 0.115 131.355);
  --chart-1: oklch(0.57 0.115 131.355);
  --chart-2: oklch(0.6 0.1 109.069);
  --chart-3: oklch(0.55 0.136 143.445);
  --chart-4: oklch(0.635 0.106 109.081);
  --chart-5: oklch(0.577 0.122 131.572);
}