Red for shadcn/ui

Red is a shadcn/ui theme built around a deep purple primary color (#40173e) with deep teal accents (#173e40). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the deep purple primary (#40173e) on a purple-tinted background (#0f060e).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#0f060eblack
Foreground
#080208black
#fbf9fbsnow
Card
#fcf8fcsnow
#0f060eblack
Card foreground
#080208black
#fbf9fbsnow
Popover
#fcf8fcsnow
#0f060eblack
Popover foreground
#080208black
#fbf9fbsnow
Primary
#40173edarkslategray
#40173edarkslategray
Primary foreground
#e1a8deplum
#e1a8deplum
Secondary
#3e4017darkolivegreen
#3e4017darkolivegreen
Secondary foreground
#dee1a8palegoldenrod
#dee1a8palegoldenrod
Muted
#f0f1e5linen
#1a1a0eblack
Muted foreground
#656657dimgray
#a7a899darkgray
Accent
#173e40darkslategray
#173e40darkslategray
Accent foreground
#a8dee1lightblue
#a8dee1lightblue
Destructive
#cb4c15chocolate
#e9642bchocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#40173edarkslategray
#40173edarkslategray

Contrast

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

Light mode
Text on background19.52:1AAA
Text on card19.52:1AAA
Primary button7.71:1AAA
Secondary button7.90:1AAA
Muted text5.11:1AA
Accent7.88:1AAA
Destructive4.58:1AA
Dark mode
Text on background19.07:1AAA
Text on card19.07:1AAA
Primary button7.71:1AAA
Secondary button7.90:1AAA
Muted text7.25:1AAA
Accent7.88:1AAA
Destructive6.30:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.006 327.093);
  --foreground: oklch(0.108 0.027 328.558);
  --muted: oklch(0.953 0.016 109.012);
  --muted-foreground: oklch(0.505 0.023 109.543);
  --popover: oklch(0.983 0.006 327.093);
  --popover-foreground: oklch(0.108 0.027 328.558);
  --card: oklch(0.983 0.006 327.093);
  --card-foreground: oklch(0.108 0.027 328.558);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.284 0.086 329.532);
  --primary-foreground: oklch(0.801 0.096 328.087);
  --secondary: oklch(0.36 0.061 111.746);
  --secondary-foreground: oklch(0.892 0.073 110.183);
  --accent: oklch(0.337 0.044 200.008);
  --accent-foreground: oklch(0.864 0.055 200.229);
  --destructive: oklch(0.582 0.173 39.899);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.284 0.086 329.532);
  --chart-1: oklch(0.284 0.086 329.532);
  --chart-2: oklch(0.36 0.061 111.746);
  --chart-3: oklch(0.337 0.044 200.008);
  --chart-4: oklch(0.401 0.07 111.814);
  --chart-5: oklch(0.285 0.091 329.645);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.025 328.45);
  --foreground: oklch(0.984 0.002 327.062);
  --muted: oklch(0.215 0.022 110.513);
  --muted-foreground: oklch(0.727 0.021 109.245);
  --popover: oklch(0.14 0.025 328.45);
  --popover-foreground: oklch(0.984 0.002 327.062);
  --card: oklch(0.14 0.025 328.45);
  --card-foreground: oklch(0.984 0.002 327.062);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.284 0.086 329.532);
  --primary-foreground: oklch(0.801 0.096 328.087);
  --secondary: oklch(0.36 0.061 111.746);
  --secondary-foreground: oklch(0.892 0.073 110.183);
  --accent: oklch(0.337 0.044 200.008);
  --accent-foreground: oklch(0.864 0.055 200.229);
  --destructive: oklch(0.661 0.179 41.275);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.284 0.086 329.532);
  --chart-1: oklch(0.284 0.086 329.532);
  --chart-2: oklch(0.36 0.061 111.746);
  --chart-3: oklch(0.337 0.044 200.008);
  --chart-4: oklch(0.401 0.07 111.814);
  --chart-5: oklch(0.285 0.091 329.645);
}