Photodiode for shadcn/ui

Photodiode is a shadcn/ui theme built around a neutral gray primary color (#6c6a6c) with neutral gray accents (#6c6a6b). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#6c6a6c) on a neutral background (#080207).

Color palette

TokenLightDark
Background
#ffffffwhite
#080207black
Foreground
#000000black
#faf4faghostwhite
Card
#fcfcfcsnow
#0c040bblack
Card foreground
#000000black
#fcf8fcsnow
Popover
#fcfcfcsnow
#0c040bblack
Popover foreground
#000000black
#fcf8fcsnow
Primary
#6c6a6cdimgray
#6c6a6cdimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#6b6a6cdimgray
#6b6a6cdimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e2d5ebgainsboro
#20142ablack
Muted foreground
#413749darkslategray
#c1b6c8silver
Accent
#6c6a6bdimgray
#6c6a6bdimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#863709saddlebrown
#db5a0fchocolate
Destructive foreground
#fbd9c6bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6c6a6cdimgray
#6c6a6cdimgray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button5.35:1AA
Secondary button5.37:1AA
Muted text8.03:1AAA
Accent5.36:1AA
Destructive6.20:1AA
Dark mode
Text on background18.93:1AAA
Text on card19.28:1AAA
Primary button5.35:1AA
Secondary button5.37:1AA
Muted text9.04:1AAA
Accent5.36:1AA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.891 0.033 311.428);
  --muted-foreground: oklch(0.354 0.033 310.967);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.527 0.004 328.143);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.526 0.004 311.669);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.527 0.003 349.83);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.439 0.12 44.672);
  --destructive-foreground: oklch(0.909 0.046 51.933);
  --ring: oklch(0.527 0.004 328.143);
  --chart-1: oklch(0.527 0.004 328.143);
  --chart-2: oklch(0.526 0.004 311.669);
  --chart-3: oklch(0.527 0.003 349.83);
  --chart-4: oklch(0.553 0.004 311.668);
  --chart-5: oklch(0.524 0.016 328.38);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.023 329.332);
  --foreground: oklch(0.974 0.009 328.164);
  --muted: oklch(0.218 0.045 309.949);
  --muted-foreground: oklch(0.791 0.027 311.446);
  --popover: oklch(0.124 0.027 329.508);
  --popover-foreground: oklch(0.983 0.006 328.13);
  --card: oklch(0.124 0.027 329.508);
  --card-foreground: oklch(0.983 0.006 328.13);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.527 0.004 328.143);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.526 0.004 311.669);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.527 0.003 349.83);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.626 0.178 43.608);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.527 0.004 328.143);
  --chart-1: oklch(0.527 0.004 328.143);
  --chart-2: oklch(0.526 0.004 311.669);
  --chart-3: oklch(0.527 0.003 349.83);
  --chart-4: oklch(0.553 0.004 311.668);
  --chart-5: oklch(0.524 0.016 328.38);
}