Charge for shadcn/ui

Charge is a shadcn/ui theme built around a vivid violet primary color (#3d13b9) with muted light violet accents (#ccc7dc). The light mode uses a neutral background (#f9f7fd). Dark mode keeps the vivid violet primary (#3d13b9) on a violet-tinted background (#06040b).

Color palette

TokenLightDark
Background
#f9f7fdghostwhite
#06040bblack
Foreground
#000000black
#fcfcfdwhite
Card
#f9f7fdghostwhite
#06040bblack
Card foreground
#000000black
#fcfcfdwhite
Popover
#f9f7fdghostwhite
#06040bblack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#3d13b9indigo
#3d13b9indigo
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e1dee8gainsboro
#231f2edarkslategray
Secondary foreground
#443d57darkslategray
#b9b3cbsilver
Muted
#dcdbe1gainsboro
#201e24black
Muted foreground
#595959dimgray
#a6a6a6darkgray
Accent
#ccc7dcthistle
#332c49darkslategray
Accent foreground
#322b45darkslategray
#cec9dethistle
Destructive
#c44708chocolate
#e6530aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3d13b9indigo
#3d13b9indigo

Contrast

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

Light mode
Text on background19.75:1AAA
Text on card19.75:1AAA
Primary button10.55:1AAA
Secondary button7.71:1AAA
Muted text5.08:1AA
Accent8.11:1AAA
Destructive4.95:1AA
Dark mode
Text on background19.88:1AAA
Text on card19.88:1AAA
Primary button10.55:1AAA
Secondary button7.95:1AAA
Muted text6.77:1AA
Accent8.14:1AAA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.007 297.695);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.894 0.008 297.661);
  --muted-foreground: oklch(0.465 0 180);
  --popover: oklch(0.979 0.007 297.695);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.007 297.695);
  --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.395 0.225 279.934);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.906 0.013 297.568);
  --secondary-foreground: oklch(0.378 0.043 295.747);
  --accent: oklch(0.839 0.03 297.196);
  --accent-foreground: oklch(0.309 0.046 295.037);
  --destructive: oklch(0.563 0.171 40.532);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.395 0.225 279.934);
  --chart-1: oklch(0.395 0.225 279.934);
  --chart-2: oklch(0.906 0.013 297.568);
  --chart-3: oklch(0.839 0.03 297.196);
  --chart-4: oklch(0.932 0.009 297.644);
  --chart-5: oklch(0.395 0.23 279.009);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.021 297.46);
  --foreground: oklch(0.991 0.001 297.801);
  --muted: oklch(0.24 0.011 296.972);
  --muted-foreground: oklch(0.724 0 180);
  --popover: oklch(0.116 0.021 297.46);
  --popover-foreground: oklch(0.991 0.001 297.801);
  --card: oklch(0.116 0.021 297.46);
  --card-foreground: oklch(0.991 0.001 297.801);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.395 0.225 279.934);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.25 0.028 295.811);
  --secondary-foreground: oklch(0.78 0.035 297.032);
  --accent: oklch(0.315 0.052 294.712);
  --accent-foreground: oklch(0.846 0.03 297.186);
  --destructive: oklch(0.634 0.195 40.225);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.395 0.225 279.934);
  --chart-1: oklch(0.395 0.225 279.934);
  --chart-2: oklch(0.25 0.028 295.811);
  --chart-3: oklch(0.315 0.052 294.712);
  --chart-4: oklch(0.278 0.032 295.704);
  --chart-5: oklch(0.395 0.23 279.009);
}