Pencil for shadcn/ui

Pencil is a shadcn/ui theme built around a muted yellow primary color (#635e4f) with muted yellow accents (#c4c0b5). The light mode uses a neutral background (#fefdfb). Dark mode keeps the muted yellow primary (#635e4f) on a yellow-tinted background (#0b0904).

Color palette

TokenLightDark
Background
#fefdfbsnow
#0b0904black
Foreground
#0d0a02black
#f9f8f5whitesmoke
Card
#fdfcf6snow
#0f0c06black
Card foreground
#090702black
#fbfbf8snow
Popover
#fdfcf6snow
#0f0c06black
Popover foreground
#090702black
#fbfbf8snow
Primary
#635e4fdimgray
#635e4fdimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d7d7d5lightgrey
#1b1a18black
Secondary foreground
#3e3e3cdarkslategray
#b6b4afdarkgray
Muted
#e3dfd4gainsboro
#2b271cblack
Muted foreground
#4c4b48darkslategray
#b7b6b3silver
Accent
#c4c0b5silver
#37342adarkslategray
Accent foreground
#282620darkslategray
#d0cdc2lightgrey
Destructive
#ae410fsaddlebrown
#ee733atomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#635e4fdimgray
#635e4fdimgray

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.56:1AAA
Primary button6.45:1AA
Secondary button7.41:1AAA
Muted text6.55:1AA
Accent8.34:1AAA
Destructive5.89:1AA
Dark mode
Text on background18.71:1AAA
Text on card18.80:1AAA
Primary button6.45:1AA
Secondary button8.38:1AAA
Muted text7.30:1AAA
Accent7.85:1AAA
Destructive7.14:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 91.44);
  --foreground: oklch(0.146 0.021 96.237);
  --muted: oklch(0.904 0.016 91.553);
  --muted-foreground: oklch(0.413 0.006 91.525);
  --popover: oklch(0.99 0.007 91.471);
  --popover-foreground: oklch(0.127 0.019 97.252);
  --card: oklch(0.99 0.007 91.471);
  --card-foreground: oklch(0.127 0.019 97.252);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.483 0.024 91.746);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.878 0.002 91.426);
  --secondary-foreground: oklch(0.363 0.003 91.486);
  --accent: oklch(0.809 0.016 91.569);
  --accent-foreground: oklch(0.267 0.011 91.709);
  --destructive: oklch(0.52 0.152 40.841);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.483 0.024 91.746);
  --chart-1: oklch(0.483 0.024 91.746);
  --chart-2: oklch(0.878 0.002 91.426);
  --chart-3: oklch(0.809 0.016 91.569);
  --chart-4: oklch(0.901 0.001 91.423);
  --chart-5: oklch(0.488 0.03 91.79);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.013 95.199);
  --foreground: oklch(0.98 0.004 91.448);
  --muted: oklch(0.275 0.02 91.814);
  --muted-foreground: oklch(0.777 0.005 91.463);
  --popover: oklch(0.157 0.015 93.297);
  --popover-foreground: oklch(0.987 0.003 91.435);
  --card: oklch(0.157 0.015 93.297);
  --card-foreground: oklch(0.987 0.003 91.435);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.483 0.024 91.746);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.218 0.004 91.554);
  --secondary-foreground: oklch(0.771 0.008 91.502);
  --accent: oklch(0.324 0.017 91.758);
  --accent-foreground: oklch(0.848 0.015 91.554);
  --destructive: oklch(0.691 0.167 43.473);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.483 0.024 91.746);
  --chart-1: oklch(0.483 0.024 91.746);
  --chart-2: oklch(0.218 0.004 91.554);
  --chart-3: oklch(0.324 0.017 91.758);
  --chart-4: oklch(0.252 0.005 91.565);
  --chart-5: oklch(0.488 0.03 91.79);
}