Photoreceptor for shadcn/ui

Photoreceptor is a shadcn/ui theme built around a light green primary color (#c4dfb4) with light violet accents (#ceb4df). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the light green primary (#c4dfb4) on a neutral background (#050703).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#050703black
Foreground
#000000black
#fcfdfcwhite
Card
#fafbf8snow
#070b05black
Card foreground
#000000black
#ffffffwhite
Popover
#fafbf8snow
#070b05black
Popover foreground
#000000black
#ffffffwhite
Primary
#c4dfb4silver
#c4dfb4silver
Primary foreground
#2c441ddarkslategray
#2c441ddarkslategray
Secondary
#ceb4dfthistle
#ceb4dfthistle
Secondary foreground
#351d44darkslategray
#351d44darkslategray
Muted
#ddd2e5gainsboro
#261a2ddarkslategray
Muted foreground
#4f4d51darkslategray
#b0aeb2darkgray
Accent
#ceb4dfthistle
#ceb4dfthistle
Accent foreground
#351d44darkslategray
#351d44darkslategray
Destructive
#740702maroon
#fb2318orangered
Destructive foreground
#feaeaalightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c4dfb4silver
#c4dfb4silver

Contrast

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

Light mode
Text on background20.63:1AAA
Text on card20.26:1AAA
Primary button7.46:1AAA
Secondary button7.96:1AAA
Muted text5.74:1AA
Accent7.96:1AAA
Destructive6.69:1AA
Dark mode
Text on background19.83:1AAA
Text on card19.85:1AAA
Primary button7.46:1AAA
Secondary button7.96:1AAA
Muted text7.50:1AAA
Accent7.96:1AAA
Destructive3.90:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 133.001);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.879 0.028 312.769);
  --muted-foreground: oklch(0.425 0.006 312.893);
  --popover: oklch(0.987 0.005 133.018);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.005 133.018);
  --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.873 0.064 133.517);
  --primary-foreground: oklch(0.356 0.069 134.727);
  --secondary: oklch(0.806 0.066 312.432);
  --secondary-foreground: oklch(0.282 0.074 310.979);
  --accent: oklch(0.806 0.066 312.432);
  --accent-foreground: oklch(0.282 0.074 310.979);
  --destructive: oklch(0.354 0.14 29.994);
  --destructive-foreground: oklch(0.826 0.095 22.654);
  --ring: oklch(0.873 0.064 133.517);
  --chart-1: oklch(0.873 0.064 133.517);
  --chart-2: oklch(0.806 0.066 312.432);
  --chart-3: oklch(0.806 0.066 312.432);
  --chart-4: oklch(0.834 0.056 312.531);
  --chart-5: oklch(0.875 0.069 133.558);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.015 131.9);
  --foreground: oklch(0.993 0.001 132.993);
  --muted: oklch(0.242 0.038 311.893);
  --muted-foreground: oklch(0.755 0.005 312.94);
  --popover: oklch(0.141 0.017 131.924);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.141 0.017 131.924);
  --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.873 0.064 133.517);
  --primary-foreground: oklch(0.356 0.069 134.727);
  --secondary: oklch(0.806 0.066 312.432);
  --secondary-foreground: oklch(0.282 0.074 310.979);
  --accent: oklch(0.806 0.066 312.432);
  --accent-foreground: oklch(0.282 0.074 310.979);
  --destructive: oklch(0.632 0.245 29.342);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.873 0.064 133.517);
  --chart-1: oklch(0.873 0.064 133.517);
  --chart-2: oklch(0.806 0.066 312.432);
  --chart-3: oklch(0.806 0.066 312.432);
  --chart-4: oklch(0.834 0.056 312.531);
  --chart-5: oklch(0.875 0.069 133.558);
}