Consent for shadcn/ui

Consent is a shadcn/ui theme built around a deep green primary color (#2c371b) with deep pink accents (#371b2c). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#2c371b) on a green-tinted background (#0b1005).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b1005black
Foreground
#0f1405black
#f8faf5whitesmoke
Card
#fcfcfcsnow
#0e1406black
Card foreground
#0c1004black
#fafbf8snow
Popover
#fcfcfcsnow
#0e1406black
Popover foreground
#0c1004black
#fafbf8snow
Primary
#2c371bdarkslategray
#2c371bdarkslategray
Primary foreground
#c7d7adsilver
#c7d7adsilver
Secondary
#1b2c37darkslategray
#1b2c37darkslategray
Secondary foreground
#adc7d7lightsteelblue
#adc7d7lightsteelblue
Muted
#d0dbe2gainsboro
#1d282fdarkslategray
Muted foreground
#5a5f63dimgray
#9ca2a5darkgray
Accent
#371b2cdarkslategray
#371b2cdarkslategray
Accent foreground
#d7adc7thistle
#d7adc7thistle
Destructive
#bf2b0dfirebrick
#db310forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2c371bdarkslategray
#2c371bdarkslategray

Contrast

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

Light mode
Text on background18.70:1AAA
Text on card18.82:1AAA
Primary button8.26:1AAA
Secondary button8.15:1AAA
Muted text4.57:1AA
Accent7.90:1AAA
Destructive5.90:1AA
Dark mode
Text on background18.34:1AAA
Text on card18.06:1AAA
Primary button8.26:1AAA
Secondary button8.15:1AAA
Muted text5.79:1AA
Accent7.90:1AAA
Destructive4.69:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.181 0.031 125.729);
  --muted: oklch(0.885 0.016 234.764);
  --muted-foreground: oklch(0.483 0.009 234.789);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.165 0.027 124.76);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.165 0.027 124.76);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.318 0.048 126.139);
  --primary-foreground: oklch(0.855 0.059 124.68);
  --secondary: oklch(0.283 0.03 236.56);
  --secondary-foreground: oklch(0.815 0.036 235.191);
  --accent: oklch(0.267 0.051 343.379);
  --accent-foreground: oklch(0.792 0.059 341.04);
  --destructive: oklch(0.526 0.188 32.578);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.318 0.048 126.139);
  --chart-1: oklch(0.318 0.048 126.139);
  --chart-2: oklch(0.283 0.03 236.56);
  --chart-3: oklch(0.267 0.051 343.379);
  --chart-4: oklch(0.315 0.035 236.674);
  --chart-5: oklch(0.321 0.052 126.346);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.163 0.025 124.688);
  --foreground: oklch(0.981 0.006 123.732);
  --muted: oklch(0.271 0.02 235.809);
  --muted-foreground: oklch(0.708 0.009 234.68);
  --popover: oklch(0.179 0.028 125.631);
  --popover-foreground: oklch(0.988 0.004 123.7);
  --card: oklch(0.179 0.028 125.631);
  --card-foreground: oklch(0.988 0.004 123.7);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.318 0.048 126.139);
  --primary-foreground: oklch(0.855 0.059 124.68);
  --secondary: oklch(0.283 0.03 236.56);
  --secondary-foreground: oklch(0.815 0.036 235.191);
  --accent: oklch(0.267 0.051 343.379);
  --accent-foreground: oklch(0.792 0.059 341.04);
  --destructive: oklch(0.582 0.21 32.495);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.318 0.048 126.139);
  --chart-1: oklch(0.318 0.048 126.139);
  --chart-2: oklch(0.283 0.03 236.56);
  --chart-3: oklch(0.267 0.051 343.379);
  --chart-4: oklch(0.315 0.035 236.674);
  --chart-5: oklch(0.321 0.052 126.346);
}