Serpentine for shadcn/ui

Serpentine is a shadcn/ui theme built around a vivid light violet primary color (#f8f0fe) with muted light violet accents (#d4cfd8). The light mode uses a neutral background (#faf7fd). Dark mode keeps the vivid light violet primary (#f8f0fe) on a violet-tinted background (#0b0510).

Color palette

TokenLightDark
Background
#faf7fdghostwhite
#0b0510black
Foreground
#030104black
#faf8fcghostwhite
Card
#f8f3fbghostwhite
#0d0614black
Card foreground
#000000black
#fdfbfdsnow
Popover
#faf7fdghostwhite
#0b0510black
Popover foreground
#030104black
#faf8fcghostwhite
Primary
#f8f0feghostwhite
#f8f0feghostwhite
Primary foreground
#6709b3rebeccapurple
#6709b3rebeccapurple
Secondary
#d4cfd8lightgrey
#1a151eblack
Secondary foreground
#3b3441darkslategray
#b4a5c0darkgray
Muted
#e1dde4gainsboro
#1f1b22black
Muted foreground
#575459dimgray
#a9a6abdarkgray
Accent
#d4cfd8lightgrey
#1a151eblack
Accent foreground
#3b3441darkslategray
#b4a5c0darkgray
Destructive
#a41a04firebrick
#f93415orangered
Destructive foreground
#fee1dcmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f8f0feghostwhite
#f8f0feghostwhite

Contrast

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

Light mode
Text on background19.62:1AAA
Text on card19.25:1AAA
Primary button8.35:1AAA
Secondary button7.82:1AAA
Muted text5.55:1AA
Accent7.82:1AAA
Destructive6.24:1AA
Dark mode
Text on background19.11:1AAA
Text on card19.37:1AAA
Primary button8.35:1AAA
Secondary button7.75:1AAA
Muted text7.03:1AAA
Accent7.75:1AAA
Destructive3.80:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.007 310.367);
  --foreground: oklch(0.082 0.018 312.178);
  --muted: oklch(0.902 0.01 310.336);
  --muted-foreground: oklch(0.451 0.009 310.25);
  --popover: oklch(0.981 0.007 310.367);
  --popover-foreground: oklch(0.082 0.018 312.178);
  --card: oklch(0.971 0.011 310.33);
  --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.966 0.02 310.246);
  --primary-foreground: oklch(0.429 0.223 300.223);
  --secondary: oklch(0.861 0.014 310.284);
  --secondary-foreground: oklch(0.338 0.024 309.775);
  --accent: oklch(0.861 0.014 310.284);
  --accent-foreground: oklch(0.338 0.024 309.775);
  --destructive: oklch(0.463 0.175 31.363);
  --destructive-foreground: oklch(0.932 0.033 28.154);
  --ring: oklch(0.966 0.02 310.246);
  --chart-1: oklch(0.966 0.02 310.246);
  --chart-2: oklch(0.861 0.014 310.284);
  --chart-3: oklch(0.861 0.014 310.284);
  --chart-4: oklch(0.886 0.012 310.316);
  --chart-5: oklch(0.966 0.021 310.24);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.029 310.341);
  --foreground: oklch(0.982 0.006 310.382);
  --muted: oklch(0.23 0.014 309.878);
  --muted-foreground: oklch(0.728 0.008 310.335);
  --popover: oklch(0.13 0.029 310.341);
  --popover-foreground: oklch(0.982 0.006 310.382);
  --card: oklch(0.142 0.033 309.102);
  --card-foreground: oklch(0.991 0.003 310.41);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.966 0.02 310.246);
  --primary-foreground: oklch(0.429 0.223 300.223);
  --secondary: oklch(0.206 0.018 309.61);
  --secondary-foreground: oklch(0.744 0.04 309.938);
  --accent: oklch(0.206 0.018 309.61);
  --accent-foreground: oklch(0.744 0.04 309.938);
  --destructive: oklch(0.637 0.234 31.456);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.966 0.02 310.246);
  --chart-1: oklch(0.966 0.02 310.246);
  --chart-2: oklch(0.206 0.018 309.61);
  --chart-3: oklch(0.206 0.018 309.61);
  --chart-4: oklch(0.237 0.023 309.532);
  --chart-5: oklch(0.966 0.021 310.24);
}