Sparkling for shadcn/ui

Sparkling is a shadcn/ui theme built around a vivid deep green primary color (#054709) with vivid deep red accents (#470905). The light mode uses a neutral background (#fbfefb). Dark mode keeps the vivid deep green primary (#054709) on a neutral background (#010401).

Color palette

TokenLightDark
Background
#fbfefbwhite
#010401black
Foreground
#031203black
#fcfdfcwhite
Card
#fbfefbwhite
#010401black
Card foreground
#031203black
#fcfdfcwhite
Popover
#fbfefbwhite
#010401black
Popover foreground
#031203black
#fcfdfcwhite
Primary
#054709darkgreen
#054709darkgreen
Primary foreground
#2aef33limegreen
#2aef33limegreen
Secondary
#090547midnightblue
#090547midnightblue
Secondary foreground
#8e88f6mediumpurple
#8e88f6mediumpurple
Muted
#efeef6whitesmoke
#090911black
Muted foreground
#525167dimgray
#9998aedarkgray
Accent
#470905maroon
#470905maroon
Accent foreground
#f68e88lightcoral
#f68e88lightcoral
Destructive
#d40d02red
#fd3f35tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#054709darkgreen
#054709darkgreen

Contrast

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

Light mode
Text on background18.94:1AAA
Text on card18.94:1AAA
Primary button7.04:1AAA
Secondary button6.22:1AA
Muted text6.68:1AA
Accent6.98:1AA
Destructive5.44:1AA
Dark mode
Text on background20.20:1AAA
Text on card20.20:1AAA
Primary button7.04:1AAA
Secondary button6.22:1AA
Muted text7.04:1AAA
Accent6.98:1AA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 146.987);
  --foreground: oklch(0.161 0.041 144.814);
  --muted: oklch(0.953 0.011 288.502);
  --muted-foreground: oklch(0.444 0.036 287.129);
  --popover: oklch(0.994 0.005 146.987);
  --popover-foreground: oklch(0.161 0.041 144.814);
  --card: oklch(0.994 0.005 146.987);
  --card-foreground: oklch(0.161 0.041 144.814);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.347 0.11 143.253);
  --primary-foreground: oklch(0.829 0.264 143.14);
  --secondary: oklch(0.197 0.114 271.441);
  --secondary-foreground: oklch(0.682 0.158 283.625);
  --accent: oklch(0.26 0.093 29.055);
  --accent-foreground: oklch(0.756 0.127 23.712);
  --destructive: oklch(0.549 0.221 29.649);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.347 0.11 143.253);
  --chart-1: oklch(0.347 0.11 143.253);
  --chart-2: oklch(0.197 0.114 271.441);
  --chart-3: oklch(0.26 0.093 29.055);
  --chart-4: oklch(0.22 0.131 270.407);
  --chart-5: oklch(0.35 0.113 143.212);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.018 145.608);
  --foreground: oklch(0.993 0.003 147.01);
  --muted: oklch(0.144 0.017 286.446);
  --muted-foreground: oklch(0.688 0.032 287.819);
  --popover: oklch(0.097 0.018 145.608);
  --popover-foreground: oklch(0.993 0.003 147.01);
  --card: oklch(0.097 0.018 145.608);
  --card-foreground: oklch(0.993 0.003 147.01);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.347 0.11 143.253);
  --primary-foreground: oklch(0.829 0.264 143.14);
  --secondary: oklch(0.197 0.114 271.441);
  --secondary-foreground: oklch(0.682 0.158 283.625);
  --accent: oklch(0.26 0.093 29.055);
  --accent-foreground: oklch(0.756 0.127 23.712);
  --destructive: oklch(0.654 0.227 28.304);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.347 0.11 143.253);
  --chart-1: oklch(0.347 0.11 143.253);
  --chart-2: oklch(0.197 0.114 271.441);
  --chart-3: oklch(0.26 0.093 29.055);
  --chart-4: oklch(0.22 0.131 270.407);
  --chart-5: oklch(0.35 0.113 143.212);
}