Stencil for shadcn/ui

Stencil is a shadcn/ui theme built around a violet primary color (#b392e7) with green accents (#c7e792). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#b392e7) on a violet-tinted background (#09070e).

Color palette

TokenLightDark
Background
#ffffffwhite
#09070eblack
Foreground
#080212black
#fcfcfdwhite
Card
#fcfcfcsnow
#0c0911black
Card foreground
#06020eblack
#ffffffwhite
Popover
#fcfcfcsnow
#0c0911black
Popover foreground
#06020eblack
#ffffffwhite
Primary
#b392e7plum
#b392e7plum
Primary foreground
#1e0d3bmidnightblue
#1e0d3bmidnightblue
Secondary
#c7e792khaki
#c7e792khaki
Secondary foreground
#293b0ddarkgreen
#293b0ddarkgreen
Muted
#e2e7dagainsboro
#202518black
Muted foreground
#5d6057dimgray
#a4a89fdarkgray
Accent
#c7e792khaki
#c7e792khaki
Accent foreground
#293b0ddarkgreen
#293b0ddarkgreen
Destructive
#722d08saddlebrown
#e55a10chocolate
Destructive foreground
#faccb3peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b392e7plum
#b392e7plum

Contrast

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

Light mode
Text on background20.43:1AAA
Text on card20.09:1AAA
Primary button6.96:1AA
Secondary button8.85:1AAA
Muted text5.09:1AA
Accent8.85:1AAA
Destructive6.82:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.80:1AAA
Primary button6.96:1AA
Secondary button8.85:1AAA
Muted text6.45:1AA
Accent8.85:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.118 0.042 302.824);
  --muted: oklch(0.921 0.019 123.943);
  --muted-foreground: oklch(0.484 0.015 124.103);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.107 0.037 304.529);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.107 0.037 304.529);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.723 0.125 300.981);
  --primary-foreground: oklch(0.216 0.083 296.276);
  --secondary: oklch(0.885 0.115 125.732);
  --secondary-foreground: oklch(0.324 0.072 128.035);
  --accent: oklch(0.885 0.115 125.732);
  --accent-foreground: oklch(0.324 0.072 128.035);
  --destructive: oklch(0.392 0.108 43.767);
  --destructive-foreground: oklch(0.878 0.062 49.823);
  --ring: oklch(0.723 0.125 300.981);
  --chart-1: oklch(0.723 0.125 300.981);
  --chart-2: oklch(0.885 0.115 125.732);
  --chart-3: oklch(0.885 0.115 125.732);
  --chart-4: oklch(0.898 0.102 125.44);
  --chart-5: oklch(0.72 0.13 300.833);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.135 0.016 303.217);
  --foreground: oklch(0.991 0.002 303.609);
  --muted: oklch(0.256 0.025 125.176);
  --muted-foreground: oklch(0.725 0.014 123.918);
  --popover: oklch(0.146 0.019 301.93);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.146 0.019 301.93);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.723 0.125 300.981);
  --primary-foreground: oklch(0.216 0.083 296.276);
  --secondary: oklch(0.885 0.115 125.732);
  --secondary-foreground: oklch(0.324 0.072 128.035);
  --accent: oklch(0.885 0.115 125.732);
  --accent-foreground: oklch(0.324 0.072 128.035);
  --destructive: oklch(0.641 0.187 42.274);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.723 0.125 300.981);
  --chart-1: oklch(0.723 0.125 300.981);
  --chart-2: oklch(0.885 0.115 125.732);
  --chart-3: oklch(0.885 0.115 125.732);
  --chart-4: oklch(0.898 0.102 125.44);
  --chart-5: oklch(0.72 0.13 300.833);
}