Concentration for shadcn/ui

Concentration is a shadcn/ui theme built around a muted green primary color (#629857) with muted green accents (#57986d). The light mode uses a neutral background (#fcfdfb). Dark mode keeps the muted green primary (#629857) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfdfbsnow
#000000black
Foreground
#070f05black
#fcfdfcwhite
Card
#fcfdfbsnow
#000000black
Card foreground
#070f05black
#fcfdfcwhite
Popover
#fcfdfbsnow
#000000black
Popover foreground
#070f05black
#fcfdfcwhite
Primary
#629857dimgray
#629857dimgray
Primary foreground
#000000black
#000000black
Secondary
#839857gray
#839857gray
Secondary foreground
#000000black
#000000black
Muted
#f2f6ealinen
#111509black
Muted foreground
#5a614cdarkolivegreen
#acb39edarkgray
Accent
#57986dmediumseagreen
#57986dmediumseagreen
Accent foreground
#000000black
#000000black
Destructive
#cb0401firebrick
#fe0f0bred
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#629857dimgray
#629857dimgray

Contrast

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

Light mode
Text on background19.11:1AAA
Text on card19.11:1AAA
Primary button6.16:1AA
Secondary button6.60:1AA
Muted text5.88:1AA
Accent6.13:1AA
Destructive5.90:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button6.16:1AA
Secondary button6.60:1AA
Muted text8.51:1AAA
Accent6.13:1AA
Destructive3.97:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 140.527);
  --foreground: oklch(0.157 0.027 139.302);
  --muted: oklch(0.966 0.017 121.772);
  --muted-foreground: oklch(0.481 0.033 122.635);
  --popover: oklch(0.994 0.003 140.527);
  --popover-foreground: oklch(0.157 0.027 139.302);
  --card: oklch(0.994 0.003 140.527);
  --card-foreground: oklch(0.157 0.027 139.302);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.626 0.11 140.339);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.648 0.093 124.009);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.625 0.094 153.649);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.53 0.216 29.363);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.626 0.11 140.339);
  --chart-1: oklch(0.626 0.11 140.339);
  --chart-2: oklch(0.648 0.093 124.009);
  --chart-3: oklch(0.625 0.094 153.649);
  --chart-4: oklch(0.678 0.097 124.023);
  --chart-5: oklch(0.633 0.121 140.343);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 140.53);
  --muted: oklch(0.189 0.024 123.674);
  --muted-foreground: oklch(0.754 0.03 122.14);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.001 140.53);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.993 0.001 140.53);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.626 0.11 140.339);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.648 0.093 124.009);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.625 0.094 153.649);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.629 0.254 29.1);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.626 0.11 140.339);
  --chart-1: oklch(0.626 0.11 140.339);
  --chart-2: oklch(0.648 0.093 124.009);
  --chart-3: oklch(0.625 0.094 153.649);
  --chart-4: oklch(0.678 0.097 124.023);
  --chart-5: oklch(0.633 0.121 140.343);
}