Sudden for shadcn/ui

Sudden is a shadcn/ui theme built around a muted red primary color (#be8995) with muted blue accents (#8995be). The light mode uses a neutral background (#fdf6f8). Dark mode keeps the muted red primary (#be8995) on a red-tinted background (#0b0406).

Color palette

TokenLightDark
Background
#fdf6f8snow
#0b0406black
Foreground
#000000black
#faf5f6whitesmoke
Card
#fdf2f5lavenderblush
#0f0508black
Card foreground
#000000black
#fcf8f9snow
Popover
#fdf6f8snow
#0b0406black
Popover foreground
#000000black
#faf5f6whitesmoke
Primary
#be8995rosybrown
#be8995rosybrown
Primary foreground
#0d0709black
#0d0709black
Secondary
#95be89darkseagreen
#95be89darkseagreen
Secondary foreground
#090d07black
#090d07black
Muted
#e2e4e2gainsboro
#1b1d1bblack
Muted foreground
#5c6a58dimgray
#99a795darkseagreen
Accent
#8995belightslategray
#8995belightslategray
Accent foreground
#07090dblack
#07090dblack
Destructive
#972702saddlebrown
#f64004orangered
Destructive foreground
#fed9cdbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#be8995rosybrown
#be8995rosybrown

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.19:1AAA
Primary button6.82:1AA
Secondary button9.31:1AAA
Muted text4.50:1AA
Accent6.73:1AA
Destructive6.14:1AA
Dark mode
Text on background18.80:1AAA
Text on card19.04:1AAA
Primary button6.82:1AA
Secondary button9.31:1AAA
Muted text6.68:1AA
Accent6.73:1AA
Destructive3.70:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.008 1.18);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.917 0.004 138.335);
  --muted-foreground: oklch(0.506 0.032 138.402);
  --popover: oklch(0.98 0.008 1.18);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.97 0.012 1.293);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.684 0.067 3.601);
  --primary-foreground: oklch(0.139 0.012 1.722);
  --secondary: oklch(0.758 0.086 138.487);
  --secondary-foreground: oklch(0.152 0.015 137.765);
  --accent: oklch(0.675 0.062 271.486);
  --accent-foreground: oklch(0.138 0.01 270.094);
  --destructive: oklch(0.449 0.153 35.807);
  --destructive-foreground: oklch(0.914 0.045 39.287);
  --ring: oklch(0.684 0.067 3.601);
  --chart-1: oklch(0.684 0.067 3.601);
  --chart-2: oklch(0.758 0.086 138.487);
  --chart-3: oklch(0.675 0.062 271.486);
  --chart-4: oklch(0.778 0.079 138.463);
  --chart-5: oklch(0.682 0.074 3.894);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.018 1.083);
  --foreground: oklch(0.974 0.006 1.131);
  --muted: oklch(0.229 0.006 138.359);
  --muted-foreground: oklch(0.712 0.029 138.375);
  --popover: oklch(0.122 0.018 1.083);
  --popover-foreground: oklch(0.974 0.006 1.131);
  --card: oklch(0.135 0.02 2.203);
  --card-foreground: oklch(0.982 0.004 1.073);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.684 0.067 3.601);
  --primary-foreground: oklch(0.139 0.012 1.722);
  --secondary: oklch(0.758 0.086 138.487);
  --secondary-foreground: oklch(0.152 0.015 137.765);
  --accent: oklch(0.675 0.062 271.486);
  --accent-foreground: oklch(0.138 0.01 270.094);
  --destructive: oklch(0.641 0.224 34.823);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.684 0.067 3.601);
  --chart-1: oklch(0.684 0.067 3.601);
  --chart-2: oklch(0.758 0.086 138.487);
  --chart-3: oklch(0.675 0.062 271.486);
  --chart-4: oklch(0.778 0.079 138.463);
  --chart-5: oklch(0.682 0.074 3.894);
}