retro for shadcn/ui

retro is a shadcn/ui theme built around an orange primary color (#764838) with teal accents (#68c7c1). The light mode uses a yellow-tinted background (#fcf1db). Dark mode keeps the orange primary (#cba986) on a neutral background (#080502).

Color palette

TokenLightDark
Background
#fcf1dbpapayawhip
#080502black
Foreground
#0e0802black
#fcfaf8snow
Card
#fffbf6snow
#0c0804black
Card foreground
#090501black
#fdfcfbsnow
Popover
#fdfaf7snow
#0c0804black
Popover foreground
#090501black
#fdfcfbsnow
Primary
#764838saddlebrown
#cba986tan
Primary foreground
#fafcfasnow
#151009black
Secondary
#faca78khaki
#1c1a17black
Secondary foreground
#625241darkolivegreen
#b9b3acdarkgray
Muted
#c0a198rosybrown
#150f0ablack
Muted foreground
#694217saddlebrown
#a7a19adarkgray
Accent
#68c7c1mediumaquamarine
#68c7c1mediumaquamarine
Accent foreground
#4e4030darkolivegreen
#4e4030darkolivegreen
Destructive
#dd5341indianred
#f54900orangered
Destructive foreground
#ffd9a2navajowhite
#ffffffwhite
Border
#d5b38etan
#26211cblack
Input
#f6a890lightsalmon
#26211cblack
Ring
#764838saddlebrown
#cba986tan

Contrast

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

Light mode
Text on background17.77:1AAA
Text on card19.70:1AAA
Primary button7.39:1AAA
Secondary button4.91:1AA
Muted text3.66:1AA Large
Accent5.01:1AA
Destructive2.91:1Fail
Dark mode
Text on background19.51:1AAA
Text on card19.50:1AAA
Primary button8.64:1AAA
Secondary button8.38:1AAA
Muted text7.41:1AAA
Accent5.01:1AA
Destructive3.59:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.961 0.031 85.242);
  --foreground: oklch(0.139 0.022 79.334);
  --muted: oklch(0.734 0.039 37.646);
  --muted-foreground: oklch(0.416 0.078 64.048);
  --popover: oklch(0.987 0.005 69.596);
  --popover-foreground: oklch(0.121 0.019 80.828);
  --card: oklch(0.99 0.007 69.23);
  --card-foreground: oklch(0.121 0.019 80.828);
  --border: oklch(0.786 0.063 68.582);
  --input: oklch(0.801 0.099 37.697);
  --primary: oklch(0.451 0.068 39.904);
  --primary-foreground: oklch(0.989 0.003 145.55);
  --secondary: oklch(0.864 0.114 79.755);
  --secondary-foreground: oklch(0.45 0.034 68.68);
  --accent: oklch(0.77 0.091 190.05);
  --accent-foreground: oklch(0.381 0.033 68.456);
  --destructive: oklch(0.623 0.176 30.197);
  --destructive-foreground: oklch(0.904 0.082 76.297);
  --ring: oklch(0.451 0.068 39.904);
  --chart-1: oklch(0.451 0.068 39.904);
  --chart-2: oklch(0.864 0.114 79.755);
  --chart-3: oklch(0.77 0.091 190.05);
  --chart-4: oklch(0.717 0.154 37.709);
  --chart-5: oklch(0.963 0.004 56.374);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.013 77.171);
  --foreground: oklch(0.986 0.003 69.617);
  --muted: oklch(0.175 0.014 68.618);
  --muted-foreground: oklch(0.712 0.012 69.475);
  --popover: oklch(0.137 0.014 76.658);
  --popover-foreground: oklch(0.993 0.002 69.634);
  --card: oklch(0.137 0.014 76.658);
  --card-foreground: oklch(0.993 0.002 69.634);
  --border: oklch(0.253 0.012 69.113);
  --input: oklch(0.253 0.012 69.113);
  --primary: oklch(0.757 0.063 68.531);
  --primary-foreground: oklch(0.176 0.016 68.461);
  --secondary: oklch(0.218 0.006 69.374);
  --secondary-foreground: oklch(0.769 0.013 69.485);
  --accent: oklch(0.77 0.091 190.05);
  --accent-foreground: oklch(0.381 0.033 68.456);
  --destructive: oklch(0.647 0.217 36.962);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.757 0.063 68.531);
  --chart-1: oklch(0.757 0.063 68.531);
  --chart-2: oklch(0.218 0.006 69.374);
  --chart-3: oklch(0.218 0.006 69.374);
  --chart-4: oklch(0.251 0.007 69.348);
  --chart-5: oklch(0.759 0.067 68.415);
}