Jar for shadcn/ui

Jar is a shadcn/ui theme built around a vivid violet primary color (#8c5fec) with muted violet accents (#b6abcf). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the vivid violet primary (#8c5fec) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#000000black
Foreground
#040208black
#f7f5fawhitesmoke
Card
#fcfcfdwhite
#000000black
Card foreground
#040208black
#f7f5fawhitesmoke
Popover
#fcfcfdwhite
#000000black
Popover foreground
#040208black
#f7f5fawhitesmoke
Primary
#8c5fecmediumslateblue
#8c5fecmediumslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#c8c2d6thistle
#1d1a23black
Secondary foreground
#2f293ddarkslategray
#b4adc2silver
Muted
#e9e7eelavender
#131118black
Muted foreground
#5a516cdimgray
#9c93aedarkgray
Accent
#b6abcfsilver
#2a2438darkslategray
Accent foreground
#201a2dblack
#c2bbd3silver
Destructive
#af2304firebrick
#fa360aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8c5fecmediumslateblue
#8c5fecmediumslateblue

Contrast

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

Light mode
Text on background20.09:1AAA
Text on card20.09:1AAA
Primary button4.22:1AA Large
Secondary button8.06:1AAA
Muted text6.07:1AA
Accent7.77:1AAA
Destructive6.85:1AA
Dark mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button4.22:1AA Large
Secondary button7.92:1AAA
Muted text6.41:1AA
Accent8.06:1AAA
Destructive3.75:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 300.731);
  --foreground: oklch(0.099 0.022 301.173);
  --muted: oklch(0.932 0.009 300.609);
  --muted-foreground: oklch(0.454 0.044 299.162);
  --popover: oklch(0.991 0.002 300.731);
  --popover-foreground: oklch(0.099 0.022 301.173);
  --card: oklch(0.991 0.002 300.731);
  --card-foreground: oklch(0.099 0.022 301.173);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.604 0.203 294.065);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.825 0.029 300.187);
  --secondary-foreground: oklch(0.296 0.037 298.637);
  --accent: oklch(0.762 0.052 299.636);
  --accent-foreground: oklch(0.235 0.037 298.045);
  --destructive: oklch(0.49 0.179 32.798);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.604 0.203 294.065);
  --chart-1: oklch(0.604 0.203 294.065);
  --chart-2: oklch(0.825 0.029 300.187);
  --chart-3: oklch(0.762 0.052 299.636);
  --chart-4: oklch(0.852 0.024 300.294);
  --chart-5: oklch(0.601 0.21 293.704);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.973 0.006 300.665);
  --muted: oklch(0.184 0.014 299.546);
  --muted-foreground: oklch(0.681 0.039 299.808);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.973 0.006 300.665);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.973 0.006 300.665);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.604 0.203 294.065);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.225 0.018 299.434);
  --secondary-foreground: oklch(0.76 0.031 300.092);
  --accent: oklch(0.276 0.038 298.455);
  --accent-foreground: oklch(0.805 0.035 300.042);
  --destructive: oklch(0.64 0.234 32.623);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.604 0.203 294.065);
  --chart-1: oklch(0.604 0.203 294.065);
  --chart-2: oklch(0.225 0.018 299.434);
  --chart-3: oklch(0.276 0.038 298.455);
  --chart-4: oklch(0.255 0.022 299.336);
  --chart-5: oklch(0.601 0.21 293.704);
}