Sudden for shadcn/ui

Sudden is a shadcn/ui theme built around a muted green primary color (#8fbc9e) with muted teal accents (#8fbcb5). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#8fbc9e) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#ffffffwhite
#010402black
Foreground
#010402black
#f9fbf9mintcream
Card
#fcfcfcsnow
#020804black
Card foreground
#000000black
#fcfdfcwhite
Popover
#fcfcfcsnow
#020804black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#8fbc9edarkseagreen
#8fbc9edarkseagreen
Primary foreground
#0a100cblack
#0a100cblack
Secondary
#97bc8fdarkseagreen
#97bc8fdarkseagreen
Secondary foreground
#0b100ablack
#0b100ablack
Muted
#dde6dbgainsboro
#1b2419black
Muted foreground
#475b43darkolivegreen
#a8bca4darkgray
Accent
#8fbcb5darkgray
#8fbcb5darkgray
Accent foreground
#0a100fblack
#0a100fblack
Destructive
#9c1d11firebrick
#ea4c3etomato
Destructive foreground
#fce6e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8fbc9edarkseagreen
#8fbc9edarkseagreen

Contrast

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

Light mode
Text on background20.59:1AAA
Text on card20.54:1AAA
Primary button9.03:1AAA
Secondary button9.07:1AAA
Muted text5.77:1AA
Accent9.17:1AAA
Destructive6.76:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button9.03:1AAA
Secondary button9.07:1AAA
Muted text7.89:1AAA
Accent9.17:1AAA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.018 156.833);
  --muted: oklch(0.915 0.019 140.5);
  --muted-foreground: oklch(0.447 0.045 140.387);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.755 0.064 155.404);
  --primary-foreground: oklch(0.164 0.013 155.495);
  --secondary: oklch(0.756 0.074 140.39);
  --secondary-foreground: oklch(0.165 0.016 140.38);
  --accent: oklch(0.761 0.049 183.677);
  --accent-foreground: oklch(0.166 0.01 183.752);
  --destructive: oklch(0.45 0.164 29.961);
  --destructive-foreground: oklch(0.941 0.025 23.855);
  --ring: oklch(0.755 0.064 155.404);
  --chart-1: oklch(0.755 0.064 155.404);
  --chart-2: oklch(0.756 0.074 140.39);
  --chart-3: oklch(0.761 0.049 183.677);
  --chart-4: oklch(0.777 0.068 140.404);
  --chart-5: oklch(0.759 0.071 155.18);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.015 156.901);
  --foreground: oklch(0.986 0.003 157.193);
  --muted: oklch(0.249 0.026 140.385);
  --muted-foreground: oklch(0.773 0.04 140.453);
  --popover: oklch(0.123 0.019 156.901);
  --popover-foreground: oklch(0.993 0.002 157.229);
  --card: oklch(0.123 0.019 156.901);
  --card-foreground: oklch(0.993 0.002 157.229);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.755 0.064 155.404);
  --primary-foreground: oklch(0.164 0.013 155.495);
  --secondary: oklch(0.756 0.074 140.39);
  --secondary-foreground: oklch(0.165 0.016 140.38);
  --accent: oklch(0.761 0.049 183.677);
  --accent-foreground: oklch(0.166 0.01 183.752);
  --destructive: oklch(0.636 0.196 28.919);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.755 0.064 155.404);
  --chart-1: oklch(0.755 0.064 155.404);
  --chart-2: oklch(0.756 0.074 140.39);
  --chart-3: oklch(0.761 0.049 183.677);
  --chart-4: oklch(0.777 0.068 140.404);
  --chart-5: oklch(0.759 0.071 155.18);
}