Distinction for shadcn/ui

Distinction is a shadcn/ui theme built around a muted green primary color (#526742) with muted light green accents (#d0d7cc). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the muted green primary (#526742) on a green-tinted background (#070a05).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#070a05black
Foreground
#020401black
#f7f9f5whitesmoke
Card
#fafcf8snow
#0a0e07black
Card foreground
#000000black
#fafbf9snow
Popover
#fafcf8snow
#0a0e07black
Popover foreground
#000000black
#fafbf9snow
Primary
#526742darkolivegreen
#526742darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e8e9e7linen
#20281bblack
Secondary foreground
#4e544adarkslategray
#b8c8acsilver
Muted
#d7e6ccgainsboro
#253319darkslategray
Muted foreground
#545851dimgray
#aaaea7darkgray
Accent
#d0d7cclightgrey
#334625darkslategray
Accent foreground
#373f31darkslategray
#cdddc0lightgrey
Destructive
#bd430ffirebrick
#ec5818chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#526742darkolivegreen
#526742darkolivegreen

Contrast

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

Light mode
Text on background20.23:1AAA
Text on card20.29:1AAA
Primary button6.24:1AA
Secondary button6.42:1AA
Muted text5.55:1AA
Accent7.42:1AAA
Destructive5.28:1AA
Dark mode
Text on background18.77:1AAA
Text on card18.80:1AAA
Primary button6.24:1AA
Secondary button8.63:1AAA
Muted text5.94:1AA
Accent7.21:1AAA
Destructive3.51:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 131.107);
  --foreground: oklch(0.1 0.016 129.731);
  --muted: oklch(0.906 0.038 131.461);
  --muted-foreground: oklch(0.453 0.012 131.315);
  --popover: oklch(0.988 0.005 131.13);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.005 131.13);
  --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.485 0.062 132.339);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.933 0.004 131.122);
  --secondary-foreground: oklch(0.437 0.017 131.426);
  --accent: oklch(0.87 0.016 131.251);
  --accent-foreground: oklch(0.356 0.025 131.723);
  --destructive: oklch(0.548 0.166 39.455);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.485 0.062 132.339);
  --chart-1: oklch(0.485 0.062 132.339);
  --chart-2: oklch(0.933 0.004 131.122);
  --chart-3: oklch(0.87 0.016 131.251);
  --chart-4: oklch(0.956 0.003 131.109);
  --chart-5: oklch(0.491 0.07 132.513);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.014 130.253);
  --foreground: oklch(0.98 0.006 131.136);
  --muted: oklch(0.301 0.048 132.75);
  --muted-foreground: oklch(0.746 0.01 131.207);
  --popover: oklch(0.155 0.016 131.053);
  --popover-foreground: oklch(0.987 0.004 131.118);
  --card: oklch(0.155 0.016 131.053);
  --card-foreground: oklch(0.987 0.004 131.118);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.485 0.062 132.339);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.264 0.026 132.018);
  --secondary-foreground: oklch(0.813 0.041 131.544);
  --accent: oklch(0.368 0.057 132.674);
  --accent-foreground: oklch(0.878 0.043 131.525);
  --destructive: oklch(0.65 0.196 39.621);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.485 0.062 132.339);
  --chart-1: oklch(0.485 0.062 132.339);
  --chart-2: oklch(0.264 0.026 132.018);
  --chart-3: oklch(0.368 0.057 132.674);
  --chart-4: oklch(0.299 0.031 132.073);
  --chart-5: oklch(0.491 0.07 132.513);
}