Salty for shadcn/ui

Salty is a shadcn/ui theme built around a vivid deep purple primary color (#670a4c) with vivid deep cyan accents (#0a4c67). The light mode uses a neutral background (#fcf8fb). Dark mode keeps the vivid deep purple primary (#670a4c) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8fbsnow
#000000black
Foreground
#000000black
#fcf8fbsnow
Card
#fbf4f9lavenderblush
#030303black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fbf4f9lavenderblush
#030303black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#670a4cpurple
#670a4cpurple
Primary foreground
#f7abe2plum
#f7abe2plum
Secondary
#4c670adarkolivegreen
#4c670adarkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dde2cfgainsboro
#2a301ddarkslategray
Muted foreground
#5b5e55dimgray
#a8aaa1darkgray
Accent
#0a4c67darkslategray
#0a4c67darkslategray
Accent foreground
#abe2f7paleturquoise
#abe2f7paleturquoise
Destructive
#b33914firebrick
#e14819chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#670a4cpurple
#670a4cpurple

Contrast

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

Light mode
Text on background19.92:1AAA
Text on card19.40:1AAA
Primary button6.90:1AA
Secondary button6.48:1AA
Muted text5.00:1AA
Accent6.65:1AA
Destructive5.97:1AA
Dark mode
Text on background19.95:1AAA
Text on card20.20:1AAA
Primary button6.90:1AA
Secondary button6.48:1AA
Muted text5.80:1AA
Accent6.65:1AA
Destructive4.09:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.006 335.303);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.904 0.026 119.803);
  --muted-foreground: oklch(0.476 0.014 119.824);
  --popover: oklch(0.974 0.009 335.361);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.974 0.009 335.361);
  --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.349 0.14 343.404);
  --primary-foreground: oklch(0.831 0.113 337.491);
  --secondary: oklch(0.474 0.116 125.628);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.393 0.075 231.36);
  --accent-foreground: oklch(0.881 0.063 224.21);
  --destructive: oklch(0.519 0.164 36.133);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.349 0.14 343.404);
  --chart-1: oklch(0.349 0.14 343.404);
  --chart-2: oklch(0.474 0.116 125.628);
  --chart-3: oklch(0.393 0.075 231.36);
  --chart-4: oklch(0.519 0.127 125.765);
  --chart-5: oklch(0.351 0.143 343.673);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.005 335.282);
  --muted: oklch(0.297 0.033 121.324);
  --muted-foreground: oklch(0.734 0.013 119.607);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.991 0.002 335.236);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.991 0.002 335.236);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.349 0.14 343.404);
  --primary-foreground: oklch(0.831 0.113 337.491);
  --secondary: oklch(0.474 0.116 125.628);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.393 0.075 231.36);
  --accent-foreground: oklch(0.881 0.063 224.21);
  --destructive: oklch(0.613 0.197 35.943);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.349 0.14 343.404);
  --chart-1: oklch(0.349 0.14 343.404);
  --chart-2: oklch(0.474 0.116 125.628);
  --chart-3: oklch(0.393 0.075 231.36);
  --chart-4: oklch(0.519 0.127 125.765);
  --chart-5: oklch(0.351 0.143 343.673);
}