Photography for shadcn/ui

Photography is a shadcn/ui theme built around a vivid green primary color (#08bf2d) with neutral gray accents (#e4e7e5). The light mode uses a neutral background (#fbfefb). Dark mode keeps the vivid green primary (#08bf2d) on a green-tinted background (#040b05).

Color palette

TokenLightDark
Background
#fbfefbwhite
#040b05black
Foreground
#010903black
#ffffffwhite
Card
#fbfefbwhite
#040b05black
Card foreground
#010903black
#ffffffwhite
Popover
#fbfefbwhite
#040b05black
Popover foreground
#010903black
#ffffffwhite
Primary
#08bf2dlimegreen
#08bf2dlimegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e4e7e5gainsboro
#1d201eblack
Secondary foreground
#48514adarkslategray
#b4bbb5silver
Muted
#e9f1ebwhitesmoke
#0e1610black
Muted foreground
#5f6d62dimgray
#92a095darkseagreen
Accent
#e4e7e5gainsboro
#1d201eblack
Accent foreground
#48514adarkslategray
#b4bbb5silver
Destructive
#c82c14firebrick
#eb4f37tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#08bf2dlimegreen
#08bf2dlimegreen

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.85:1AAA
Primary button2.47:1Fail
Secondary button6.60:1AA
Muted text4.73:1AA
Accent6.60:1AA
Destructive5.51:1AA
Dark mode
Text on background19.86:1AAA
Text on card19.86:1AAA
Primary button2.47:1Fail
Secondary button8.37:1AAA
Muted text6.75:1AA
Accent8.37:1AAA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 151.93);
  --foreground: oklch(0.125 0.027 150.859);
  --muted: oklch(0.951 0.011 151.828);
  --muted-foreground: oklch(0.52 0.025 151.269);
  --popover: oklch(0.994 0.005 151.93);
  --popover-foreground: oklch(0.125 0.027 150.859);
  --card: oklch(0.994 0.005 151.93);
  --card-foreground: oklch(0.125 0.027 150.859);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.699 0.224 144.197);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.925 0.005 151.931);
  --secondary-foreground: oklch(0.425 0.017 151.399);
  --accent: oklch(0.925 0.005 151.931);
  --accent-foreground: oklch(0.425 0.017 151.399);
  --destructive: oklch(0.543 0.195 31.572);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.699 0.224 144.197);
  --chart-1: oklch(0.699 0.224 144.197);
  --chart-2: oklch(0.925 0.005 151.931);
  --chart-3: oklch(0.925 0.005 151.931);
  --chart-4: oklch(0.948 0.003 151.955);
  --chart-5: oklch(0.707 0.228 144.058);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.021 151.171);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.188 0.017 150.596);
  --muted-foreground: oklch(0.691 0.023 151.494);
  --popover: oklch(0.14 0.021 151.171);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.14 0.021 151.171);
  --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.699 0.224 144.197);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.24 0.006 151.596);
  --secondary-foreground: oklch(0.785 0.011 151.79);
  --accent: oklch(0.24 0.006 151.596);
  --accent-foreground: oklch(0.785 0.011 151.79);
  --destructive: oklch(0.641 0.196 31.487);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.699 0.224 144.197);
  --chart-1: oklch(0.699 0.224 144.197);
  --chart-2: oklch(0.24 0.006 151.596);
  --chart-3: oklch(0.24 0.006 151.596);
  --chart-4: oklch(0.273 0.008 151.568);
  --chart-5: oklch(0.707 0.228 144.058);
}