Sudden for shadcn/ui

Sudden is a shadcn/ui theme built around a green primary color (#6baf46) with muted light green accents (#bdd0b3). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#6baf46) on a neutral background (#050704).

Color palette

TokenLightDark
Background
#ffffffwhite
#050704black
Foreground
#081103black
#f7f9f6whitesmoke
Card
#fcfcfcsnow
#070a05black
Card foreground
#060d02black
#fafbf9snow
Popover
#ffffffwhite
#050704black
Popover foreground
#081103black
#f7f9f6whitesmoke
Primary
#6baf46olivedrab
#6baf46olivedrab
Primary foreground
#121d0cblack
#121d0cblack
Secondary
#d7e0d2gainsboro
#303030darkslategray
Secondary foreground
#3c4b34darkslategray
#c9c9c9silver
Muted
#e2e5e1gainsboro
#1e1a1ablack
Muted foreground
#404040darkslategray
#bfbfbfsilver
Accent
#bdd0b3silver
#4b3f3fdarkslategray
Accent foreground
#26331fdarkslategray
#e1dbdbgainsboro
Destructive
#ae370ffirebrick
#eb511echocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6baf46olivedrab
#6baf46olivedrab

Contrast

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

Light mode
Text on background19.23:1AAA
Text on card19.27:1AAA
Primary button6.49:1AA
Secondary button6.86:1AA
Muted text8.16:1AAA
Accent8.18:1AAA
Destructive6.28:1AA
Dark mode
Text on background19.13:1AAA
Text on card19.18:1AAA
Primary button6.49:1AA
Secondary button7.91:1AAA
Muted text9.37:1AAA
Accent7.40:1AAA
Destructive3.65: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.165 0.035 133.449);
  --muted: oklch(0.919 0.006 134.256);
  --muted-foreground: oklch(0.371 0 168.69);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.165 0.035 133.449);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.147 0.03 132.566);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.686 0.156 136.137);
  --primary-foreground: oklch(0.215 0.036 135.407);
  --secondary: oklch(0.895 0.021 134.351);
  --secondary-foreground: oklch(0.394 0.042 134.881);
  --accent: oklch(0.837 0.045 134.532);
  --accent-foreground: oklch(0.302 0.038 135.028);
  --destructive: oklch(0.507 0.162 36.703);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.686 0.156 136.137);
  --chart-1: oklch(0.686 0.156 136.137);
  --chart-2: oklch(0.895 0.021 134.351);
  --chart-3: oklch(0.837 0.045 134.532);
  --chart-4: oklch(0.916 0.017 134.322);
  --chart-5: oklch(0.694 0.164 136.299);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.012 133.33);
  --foreground: oklch(0.979 0.004 134.244);
  --muted: oklch(0.223 0.006 17.626);
  --muted-foreground: oklch(0.805 0 169.695);
  --popover: oklch(0.121 0.012 133.33);
  --popover-foreground: oklch(0.979 0.004 134.244);
  --card: oklch(0.139 0.013 133.33);
  --card-foreground: oklch(0.986 0.003 134.236);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.686 0.156 136.137);
  --primary-foreground: oklch(0.215 0.036 135.407);
  --secondary: oklch(0.311 0 180);
  --secondary-foreground: oklch(0.837 0 171.254);
  --accent: oklch(0.379 0.017 17.939);
  --accent-foreground: oklch(0.896 0.007 17.279);
  --destructive: oklch(0.641 0.199 37.063);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.686 0.156 136.137);
  --chart-1: oklch(0.686 0.156 136.137);
  --chart-2: oklch(0.311 0 180);
  --chart-3: oklch(0.379 0.017 17.939);
  --chart-4: oklch(0.341 0 158.199);
  --chart-5: oklch(0.694 0.164 136.299);
}