Salty for shadcn/ui

Salty is a shadcn/ui theme built around a muted light green primary color (#f6f9f6) with muted light red accents (#f9f6f6). The light mode uses a neutral background (#fbfefb). Dark mode keeps the muted light green primary (#f6f9f6) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefbwhite
#000000black
Foreground
#000000black
#f9fbf9mintcream
Card
#f6fdf7mintcream
#030303black
Card foreground
#000000black
#fcfdfcwhite
Popover
#fbfefbwhite
#000000black
Popover foreground
#000000black
#f9fbf9mintcream
Primary
#f6f9f6whitesmoke
#f6f9f6whitesmoke
Primary foreground
#243326darkslategray
#243326darkslategray
Secondary
#f6f6f9whitesmoke
#f6f6f9whitesmoke
Secondary foreground
#524d6fdarkslateblue
#524d6fdarkslateblue
Muted
#ecebeflavender
#111014black
Muted foreground
#4b4955darkslategray
#acaab6darkgray
Accent
#f9f6f6whitesmoke
#f9f6f6whitesmoke
Accent foreground
#6f524ddimgray
#6f524ddimgray
Destructive
#700401maroon
#fe0a01red
Destructive foreground
#ffa7a4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f6f9f6whitesmoke
#f6f9f6whitesmoke

Contrast

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

Light mode
Text on background20.68:1AAA
Text on card20.38:1AAA
Primary button12.53:1AAA
Secondary button7.34:1AAA
Muted text7.44:1AAA
Accent6.54:1AA
Destructive6.64:1AA
Dark mode
Text on background20.19:1AAA
Text on card20.28:1AAA
Primary button12.53:1AAA
Secondary button7.34:1AAA
Muted text8.28:1AAA
Accent6.54:1AA
Destructive4.00: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.994 0.005 150.176);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.943 0.005 293.21);
  --muted-foreground: oklch(0.411 0.021 292.331);
  --popover: oklch(0.994 0.005 150.176);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.011 150.104);
  --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.979 0.004 150.19);
  --primary-foreground: oklch(0.303 0.031 148.788);
  --secondary: oklch(0.974 0.004 293.235);
  --secondary-foreground: oklch(0.441 0.055 290.813);
  --accent: oklch(0.976 0.003 29.477);
  --accent-foreground: oklch(0.469 0.04 30.012);
  --destructive: oklch(0.344 0.138 29.851);
  --destructive-foreground: oklch(0.813 0.105 21.774);
  --ring: oklch(0.979 0.004 150.19);
  --chart-1: oklch(0.979 0.004 150.19);
  --chart-2: oklch(0.974 0.004 293.235);
  --chart-3: oklch(0.976 0.003 29.477);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.979 0.005 150.181);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.986 0.004 150.195);
  --muted: oklch(0.176 0.007 292.513);
  --muted-foreground: oklch(0.742 0.018 292.846);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.986 0.004 150.195);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.993 0.002 150.221);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.979 0.004 150.19);
  --primary-foreground: oklch(0.303 0.031 148.788);
  --secondary: oklch(0.974 0.004 293.235);
  --secondary-foreground: oklch(0.441 0.055 290.813);
  --accent: oklch(0.976 0.003 29.477);
  --accent-foreground: oklch(0.469 0.04 30.012);
  --destructive: oklch(0.627 0.255 29.461);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.979 0.004 150.19);
  --chart-1: oklch(0.979 0.004 150.19);
  --chart-2: oklch(0.974 0.004 293.235);
  --chart-3: oklch(0.976 0.003 29.477);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.979 0.005 150.181);
}