Infinity Dark Theme Eye Friendly Colors for shadcn/ui

Infinity Dark Theme Eye Friendly Colors is a shadcn/ui theme built around a vivid yellow primary color (#ffc800) with deep blue accents (#2e4c61). The light mode uses a blue-tinted background (#15232d). Dark mode keeps the vivid yellow primary (#ffc800) on a blue-tinted background (#15232d).

Color palette

TokenLightDark
Background
#15232dblack
#15232dblack
Foreground
#ffffffwhite
#ffffffwhite
Card
#121e26black
#121e26black
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#101b23black
#101b23black
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#ffc800gold
#ffc800gold
Primary foreground
#332800black
#332800black
Secondary
#534b2ddarkolivegreen
#534b2ddarkolivegreen
Secondary foreground
#e4dfcdgainsboro
#e4dfcdgainsboro
Muted
#262c31darkslategray
#262c31darkslategray
Muted foreground
#a1adb5darkgray
#a1adb5darkgray
Accent
#2e4c61darkslategray
#2e4c61darkslategray
Accent foreground
#d5e2ebgainsboro
#d5e2ebgainsboro
Destructive
#f35d3ftomato
#f35d3ftomato
Destructive foreground
#000000black
#000000black
Border
#22303adarkslategray
#22303adarkslategray
Input
#283843darkslategray
#283843darkslategray
Ring
#ffc800gold
#ffc800gold

Contrast

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

Light mode
Text on background16.00:1AAA
Text on card16.97:1AAA
Primary button9.34:1AAA
Secondary button6.55:1AA
Muted text6.14:1AA
Accent6.87:1AA
Destructive6.44:1AA
Dark mode
Text on background16.00:1AAA
Text on card16.97:1AAA
Primary button9.34:1AAA
Secondary button6.55:1AA
Muted text6.14:1AA
Accent6.87:1AA
Destructive6.44:1AA

CSS variables

Paste this into your globals.css to use Infinity Dark Theme Eye Friendly Colors in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.249 0.027 240.288);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.29 0.012 238.958);
  --muted-foreground: oklch(0.739 0.018 238.714);
  --popover: oklch(0.216 0.022 240.092);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.227 0.023 240.164);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.301 0.026 239.797);
  --input: oklch(0.331 0.03 239.857);
  --primary: oklch(0.857 0.175 88.369);
  --primary-foreground: oklch(0.281 0.058 92.808);
  --secondary: oklch(0.412 0.047 94.462);
  --secondary-foreground: oklch(0.903 0.025 94.139);
  --accent: oklch(0.401 0.051 240.773);
  --accent-foreground: oklch(0.907 0.019 238.658);
  --destructive: oklch(0.669 0.19 33.182);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.857 0.175 88.369);
  --chart-1: oklch(0.857 0.175 88.369);
  --chart-2: oklch(0.412 0.047 94.462);
  --chart-3: oklch(0.401 0.051 240.773);
  --chart-4: oklch(0.445 0.051 94.455);
  --chart-5: oklch(0.865 0.177 88.019);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.249 0.027 240.288);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.29 0.012 238.958);
  --muted-foreground: oklch(0.739 0.018 238.714);
  --popover: oklch(0.216 0.022 240.092);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.227 0.023 240.164);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.301 0.026 239.797);
  --input: oklch(0.331 0.03 239.857);
  --primary: oklch(0.857 0.175 88.369);
  --primary-foreground: oklch(0.281 0.058 92.808);
  --secondary: oklch(0.412 0.047 94.462);
  --secondary-foreground: oklch(0.903 0.025 94.139);
  --accent: oklch(0.401 0.051 240.773);
  --accent-foreground: oklch(0.907 0.019 238.658);
  --destructive: oklch(0.669 0.19 33.182);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.857 0.175 88.369);
  --chart-1: oklch(0.857 0.175 88.369);
  --chart-2: oklch(0.412 0.047 94.462);
  --chart-3: oklch(0.401 0.051 240.773);
  --chart-4: oklch(0.445 0.051 94.455);
  --chart-5: oklch(0.865 0.177 88.019);
}