sg for shadcn/ui

sg is a shadcn/ui theme built around a vivid red primary color (#fe595e) with deep green accents (#5f6f1b). The light mode uses a neutral background (#fbfdfe). Dark mode switches to a deep cyan primary (#1b5f6f) on a cyan-tinted background (#030a0c).

Color palette

TokenLightDark
Background
#fbfdfewhite
#030a0cblack
Foreground
#020b0eblack
#ffffffwhite
Card
#ffffffwhite
#040e10black
Card foreground
#010809black
#ffffffwhite
Popover
#f7fbfcghostwhite
#040e10black
Popover foreground
#010809black
#ffffffwhite
Primary
#fe595etomato
#1b5f6fdarkslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#333f50darkslategray
#6f1b5fpurple
Secondary foreground
#f2caebmistyrose
#f2caebmistyrose
Muted
#eeddeblavender
#22111fblack
Muted foreground
#644f60dimgray
#b09baddarkgray
Accent
#5f6f1bdarkolivegreen
#5f6f1bdarkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#8d1b07darkred
#e02b0borangered
Destructive foreground
#fcd1c9pink
#ffffffwhite
Border
#e0e5e6gainsboro
#161b1dblack
Input
#e0e5e6gainsboro
#161b1dblack
Ring
#1b5f6fdarkslategray
#1b5f6fdarkslategray

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card20.19:1AAA
Primary button3.08:1AA Large
Secondary button7.32:1AAA
Muted text5.70:1AA
Accent5.56:1AA
Destructive6.58:1AA
Dark mode
Text on background19.90:1AAA
Text on card19.52:1AAA
Primary button7.17:1AAA
Secondary button7.22:1AAA
Muted text6.97:1AA
Accent5.56:1AA
Destructive4.65:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 212.663);
  --foreground: oklch(0.141 0.02 209.367);
  --muted: oklch(0.915 0.027 331.826);
  --muted-foreground: oklch(0.454 0.039 332.578);
  --popover: oklch(0.987 0.005 212.665);
  --popover-foreground: oklch(0.123 0.017 207.706);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.123 0.017 207.706);
  --border: oklch(0.918 0.006 212.667);
  --input: oklch(0.918 0.006 212.667);
  --primary: oklch(0.686 0.2 22.434);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.364 0.034 257.095);
  --secondary-foreground: oklch(0.882 0.063 332.379);
  --accent: oklch(0.512 0.108 119.527);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.419 0.152 32.054);
  --destructive-foreground: oklch(0.896 0.05 29.771);
  --ring: oklch(0.452 0.07 216.115);
  --chart-1: oklch(0.452 0.07 216.115);
  --chart-2: oklch(0.387 0.141 336.409);
  --chart-3: oklch(0.512 0.108 119.527);
  --chart-4: oklch(0.416 0.153 336.479);
  --chart-5: oklch(0.456 0.072 216.43);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.014 209.658);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.208 0.039 333.871);
  --muted-foreground: oklch(0.714 0.035 332.086);
  --popover: oklch(0.154 0.017 211.626);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.154 0.017 211.626);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.219 0.008 212.758);
  --input: oklch(0.219 0.008 212.758);
  --primary: oklch(0.452 0.07 216.115);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.387 0.141 336.409);
  --secondary-foreground: oklch(0.882 0.063 332.379);
  --accent: oklch(0.512 0.108 119.527);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.586 0.218 31.71);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.452 0.07 216.115);
  --chart-1: oklch(0.452 0.07 216.115);
  --chart-2: oklch(0.387 0.141 336.409);
  --chart-3: oklch(0.512 0.108 119.527);
  --chart-4: oklch(0.416 0.153 336.479);
  --chart-5: oklch(0.456 0.072 216.43);
}