Retina for shadcn/ui

Retina is a shadcn/ui theme built around a near-white primary color (#f9f8fc) with near-white accents (#f8fcf9). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the near-white primary (#f9f8fc) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#020104black
Foreground
#050312black
#f9f9fbghostwhite
Card
#f5f4fbwhitesmoke
#030308black
Card foreground
#03020dblack
#fcfcfdwhite
Popover
#f5f4fbwhitesmoke
#030308black
Popover foreground
#03020dblack
#fcfcfdwhite
Primary
#f9f8fcghostwhite
#f9f8fcghostwhite
Primary foreground
#494181darkslateblue
#494181darkslateblue
Secondary
#fcf9f8snow
#fcf9f8snow
Secondary foreground
#814941sienna
#814941sienna
Muted
#f4f1f0whitesmoke
#0f0b0bblack
Muted foreground
#5f5553dimgray
#aca1a0darkgray
Accent
#f8fcf9mintcream
#f8fcf9mintcream
Accent foreground
#1f3d23darkslategray
#1f3d23darkslategray
Destructive
#b83b0afirebrick
#f3581borangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f9f8fcghostwhite
#f9f8fcghostwhite

Contrast

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

Light mode
Text on background19.22:1AAA
Text on card18.82:1AAA
Primary button8.43:1AAA
Secondary button6.74:1AA
Muted text6.41:1AA
Accent11.56:1AAA
Destructive5.71:1AA
Dark mode
Text on background19.78:1AAA
Text on card20.10:1AAA
Primary button8.43:1AAA
Secondary button6.74:1AA
Muted text7.78:1AAA
Accent11.56:1AAA
Destructive6.23:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.006 292.421);
  --foreground: oklch(0.113 0.039 287.867);
  --muted: oklch(0.96 0.004 27.952);
  --muted-foreground: oklch(0.458 0.015 28.125);
  --popover: oklch(0.969 0.01 292.357);
  --popover-foreground: oklch(0.102 0.034 288.853);
  --card: oklch(0.969 0.01 292.357);
  --card-foreground: oklch(0.102 0.034 288.853);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.981 0.004 292.458);
  --primary-foreground: oklch(0.416 0.104 287.104);
  --secondary: oklch(0.983 0.003 27.949);
  --secondary-foreground: oklch(0.471 0.077 29.592);
  --accent: oklch(0.986 0.005 149.618);
  --accent-foreground: oklch(0.328 0.059 147.129);
  --destructive: oklch(0.53 0.169 37.796);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.981 0.004 292.458);
  --chart-1: oklch(0.981 0.004 292.458);
  --chart-2: oklch(0.983 0.003 27.949);
  --chart-3: oklch(0.986 0.005 149.618);
  --chart-4: oklch(1.008 0.002 207.927);
  --chart-5: oklch(0.981 0.005 292.45);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.015 290.787);
  --foreground: oklch(0.982 0.003 292.487);
  --muted: oklch(0.155 0.006 28.17);
  --muted-foreground: oklch(0.718 0.013 28.032);
  --popover: oklch(0.099 0.019 290.787);
  --popover-foreground: oklch(0.991 0.001 292.515);
  --card: oklch(0.099 0.019 290.787);
  --card-foreground: oklch(0.991 0.001 292.515);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.981 0.004 292.458);
  --primary-foreground: oklch(0.416 0.104 287.104);
  --secondary: oklch(0.983 0.003 27.949);
  --secondary-foreground: oklch(0.471 0.077 29.592);
  --accent: oklch(0.986 0.005 149.618);
  --accent-foreground: oklch(0.328 0.059 147.129);
  --destructive: oklch(0.661 0.201 38.776);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.981 0.004 292.458);
  --chart-1: oklch(0.981 0.004 292.458);
  --chart-2: oklch(0.983 0.003 27.949);
  --chart-3: oklch(0.986 0.005 149.618);
  --chart-4: oklch(1.008 0.002 207.927);
  --chart-5: oklch(0.981 0.005 292.45);
}