Photoreceptor for shadcn/ui

Photoreceptor is a shadcn/ui theme built around a muted indigo primary color (#626384) with muted yellow accents (#848362). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the muted indigo primary (#626384) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#030407black
Foreground
#010104black
#fcfcfdwhite
Card
#f8f8fcghostwhite
#05050ablack
Card foreground
#000000black
#ffffffwhite
Popover
#f8f8fcghostwhite
#05050ablack
Popover foreground
#000000black
#ffffffwhite
Primary
#626384dimgray
#626384dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#848362gray
#848362gray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e7e7cfgainsboro
#302f18darkslategray
Muted foreground
#717056dimgray
#a9a98edarkgray
Accent
#848362gray
#848362gray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d9400dorangered
#f36435tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#626384dimgray
#626384dimgray

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card19.76:1AAA
Primary button5.80:1AA
Secondary button3.89:1AA Large
Muted text4.02:1AA Large
Accent3.89:1AA Large
Destructive4.48:1AA Large
Dark mode
Text on background20.02:1AAA
Text on card20.30:1AAA
Primary button5.80:1AA
Secondary button3.89:1AA Large
Muted text5.66:1AA
Accent3.89:1AA Large
Destructive6.70:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 284.753);
  --foreground: oklch(0.072 0.02 277.636);
  --muted: oklch(0.921 0.031 105.383);
  --muted-foreground: oklch(0.54 0.04 106.018);
  --popover: oklch(0.979 0.006 284.697);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.006 284.697);
  --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.511 0.053 282.829);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.601 0.048 106.103);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.601 0.048 106.103);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.591 0.197 35.892);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.511 0.053 282.829);
  --chart-1: oklch(0.511 0.053 282.829);
  --chart-2: oklch(0.601 0.048 106.103);
  --chart-3: oklch(0.601 0.048 106.103);
  --chart-4: oklch(0.63 0.05 106.109);
  --chart-5: oklch(0.502 0.063 282.336);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.011 282.332);
  --foreground: oklch(0.991 0.002 284.774);
  --muted: oklch(0.299 0.038 106.777);
  --muted-foreground: oklch(0.727 0.038 105.673);
  --popover: oklch(0.12 0.013 282.332);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.12 0.013 282.332);
  --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.511 0.053 282.829);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.601 0.048 106.103);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.601 0.048 106.103);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.678 0.186 38.16);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.511 0.053 282.829);
  --chart-1: oklch(0.511 0.053 282.829);
  --chart-2: oklch(0.601 0.048 106.103);
  --chart-3: oklch(0.601 0.048 106.103);
  --chart-4: oklch(0.63 0.05 106.109);
  --chart-5: oklch(0.502 0.063 282.336);
}