Ounce for shadcn/ui

Ounce is a shadcn/ui theme built around a vivid indigo primary color (#4949fd) with vivid green accents (#49fd49). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the vivid indigo primary (#4949fd) on an indigo-tinted background (#04040b).

Color palette

TokenLightDark
Background
#f7f7fdghostwhite
#04040bblack
Foreground
#03030cblack
#f6f6f9whitesmoke
Card
#f7f7fdghostwhite
#04040bblack
Card foreground
#03030cblack
#f6f6f9whitesmoke
Popover
#f7f7fdghostwhite
#04040bblack
Popover foreground
#03030cblack
#f6f6f9whitesmoke
Primary
#4949fdroyalblue
#4949fdroyalblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#fd4949tomato
#fd4949tomato
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e9d3d3gainsboro
#2c1616black
Muted foreground
#4a3b3bdarkslategray
#c4b5b5silver
Accent
#49fd49limegreen
#49fd49limegreen
Accent foreground
#001400black
#001400black
Destructive
#c23714firebrick
#e9512bchocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4949fdroyalblue
#4949fdroyalblue

Contrast

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

Light mode
Text on background19.26:1AAA
Text on card19.26:1AAA
Primary button5.73:1AA
Secondary button3.36:1AA Large
Muted text7.42:1AAA
Accent14.04:1AAA
Destructive5.45:1AA
Dark mode
Text on background18.96:1AAA
Text on card18.96:1AAA
Primary button5.73:1AA
Secondary button3.36:1AA Large
Muted text8.59:1AAA
Accent14.04:1AAA
Destructive3.71:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.007 286.264);
  --foreground: oklch(0.107 0.026 281.181);
  --muted: oklch(0.885 0.024 17.622);
  --muted-foreground: oklch(0.368 0.021 18.128);
  --popover: oklch(0.978 0.007 286.264);
  --popover-foreground: oklch(0.107 0.026 281.181);
  --card: oklch(0.978 0.007 286.264);
  --card-foreground: oklch(0.107 0.026 281.181);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.534 0.257 273.47);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.666 0.216 25.282);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.872 0.261 142.93);
  --accent-foreground: oklch(0.167 0.056 142.555);
  --destructive: oklch(0.543 0.181 34.316);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.534 0.257 273.47);
  --chart-1: oklch(0.534 0.257 273.47);
  --chart-2: oklch(0.666 0.216 25.282);
  --chart-3: oklch(0.872 0.261 142.93);
  --chart-4: oklch(0.684 0.201 24.129);
  --chart-5: oklch(0.532 0.263 272.907);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.022 282.326);
  --foreground: oklch(0.973 0.005 286.309);
  --muted: oklch(0.232 0.036 20.153);
  --muted-foreground: oklch(0.787 0.017 17.513);
  --popover: oklch(0.111 0.022 282.326);
  --popover-foreground: oklch(0.973 0.005 286.309);
  --card: oklch(0.111 0.022 282.326);
  --card-foreground: oklch(0.973 0.005 286.309);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.534 0.257 273.47);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.666 0.216 25.282);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.872 0.261 142.93);
  --accent-foreground: oklch(0.167 0.056 142.555);
  --destructive: oklch(0.637 0.195 34.887);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.534 0.257 273.47);
  --chart-1: oklch(0.534 0.257 273.47);
  --chart-2: oklch(0.666 0.216 25.282);
  --chart-3: oklch(0.872 0.261 142.93);
  --chart-4: oklch(0.684 0.201 24.129);
  --chart-5: oklch(0.532 0.263 272.907);
}