Second for shadcn/ui

Second is a shadcn/ui theme built around a deep purple primary color (#140817) with muted purple accents (#caadd2). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the deep purple primary (#140817) on a purple-tinted background (#0a040b).

Color palette

TokenLightDark
Background
#fdfbfewhite
#0a040bblack
Foreground
#0b030dblack
#f8f7f8whitesmoke
Card
#fbf7fdghostwhite
#0d060fblack
Card foreground
#070208black
#faf9fasnow
Popover
#fdfbfewhite
#0a040bblack
Popover foreground
#0b030dblack
#f8f7f8whitesmoke
Primary
#140817black
#140817black
Primary foreground
#c17fd2orchid
#c17fd2orchid
Secondary
#d9cbdcthistle
#19141ablack
Secondary foreground
#422f46darkslategray
#b7a4bcdarkgray
Muted
#dfcfe3gainsboro
#2c1c30darkslategray
Muted foreground
#575058dimgray
#ada7afdarkgray
Accent
#caadd2thistle
#2c1d2fdarkslategray
Accent foreground
#2d1b31darkslategray
#c8b1cesilver
Destructive
#ba380dfirebrick
#d7410forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#140817black
#140817black

Contrast

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

Light mode
Text on background19.77:1AAA
Text on card19.45:1AAA
Primary button6.72:1AA
Secondary button7.83:1AAA
Muted text5.24:1AA
Accent7.92:1AAA
Destructive5.73:1AA
Dark mode
Text on background18.97:1AAA
Text on card19.08:1AAA
Primary button6.72:1AA
Secondary button7.84:1AAA
Muted text6.75:1AA
Accent8.01:1AAA
Destructive4.52:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 319.445);
  --foreground: oklch(0.119 0.033 321.224);
  --muted: oklch(0.873 0.032 319.454);
  --muted-foreground: oklch(0.441 0.016 319.454);
  --popover: oklch(0.991 0.004 319.445);
  --popover-foreground: oklch(0.119 0.033 321.224);
  --card: oklch(0.982 0.008 319.447);
  --card-foreground: oklch(0.104 0.029 321.694);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.16 0.035 319.478);
  --primary-foreground: oklch(0.694 0.138 319.425);
  --secondary: oklch(0.859 0.028 319.453);
  --secondary-foreground: oklch(0.336 0.047 319.459);
  --accent: oklch(0.784 0.061 319.463);
  --accent-foreground: oklch(0.256 0.047 319.437);
  --destructive: oklch(0.53 0.173 36.304);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.16 0.035 319.478);
  --chart-1: oklch(0.16 0.035 319.478);
  --chart-2: oklch(0.859 0.028 319.453);
  --chart-3: oklch(0.784 0.061 319.463);
  --chart-4: oklch(0.884 0.023 319.452);
  --chart-5: oklch(0.16 0.037 319.494);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.022 320.845);
  --foreground: oklch(0.976 0.002 319.445);
  --muted: oklch(0.257 0.043 319.449);
  --muted-foreground: oklch(0.735 0.014 319.45);
  --popover: oklch(0.124 0.022 320.845);
  --popover-foreground: oklch(0.976 0.002 319.445);
  --card: oklch(0.137 0.026 320.055);
  --card-foreground: oklch(0.984 0.002 319.445);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.16 0.035 319.478);
  --primary-foreground: oklch(0.694 0.138 319.425);
  --secondary: oklch(0.199 0.016 319.463);
  --secondary-foreground: oklch(0.743 0.04 319.458);
  --accent: oklch(0.258 0.038 319.458);
  --accent-foreground: oklch(0.788 0.048 319.46);
  --destructive: oklch(0.588 0.194 36.134);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.16 0.035 319.478);
  --chart-1: oklch(0.16 0.035 319.478);
  --chart-2: oklch(0.199 0.016 319.463);
  --chart-3: oklch(0.258 0.038 319.458);
  --chart-4: oklch(0.231 0.021 319.464);
  --chart-5: oklch(0.16 0.037 319.494);
}