Unwritten for shadcn/ui

Unwritten is a shadcn/ui theme built around a purple primary color (#a555a4) with green accents (#55a556). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the purple primary (#a555a4) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#000000black
Foreground
#000000black
#f9f5f9whitesmoke
Card
#fcf8fcsnow
#000000black
Card foreground
#000000black
#f9f5f9whitesmoke
Popover
#fcf8fcsnow
#000000black
Popover foreground
#000000black
#f9f5f9whitesmoke
Primary
#a555a4mediumorchid
#a555a4mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#55a556mediumseagreen
#55a556mediumseagreen
Secondary foreground
#000000black
#000000black
Muted
#ecefecwhitesmoke
#101310black
Muted foreground
#5a725adimgray
#8da58ddarkseagreen
Accent
#55a556mediumseagreen
#55a556mediumseagreen
Accent foreground
#000000black
#000000black
Destructive
#95210fbrown
#d12e15firebrick
Destructive foreground
#fbdedamistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a555a4mediumorchid
#a555a4mediumorchid

Contrast

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

Light mode
Text on background19.92:1AAA
Text on card19.92:1AAA
Primary button4.74:1AA
Secondary button6.89:1AA
Muted text4.53:1AA
Accent6.89:1AA
Destructive6.65:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button4.74:1AA
Secondary button6.89:1AA
Muted text7.01:1AAA
Accent6.89:1AA
Destructive5.11:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.008 326.119);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.948 0.005 146.007);
  --muted-foreground: oklch(0.526 0.047 145.291);
  --popover: oklch(0.983 0.008 326.119);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.008 326.119);
  --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.574 0.146 327.883);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.652 0.138 144.111);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.652 0.138 144.111);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.439 0.154 31.628);
  --destructive-foreground: oklch(0.924 0.033 28.153);
  --ring: oklch(0.574 0.146 327.883);
  --chart-1: oklch(0.574 0.146 327.883);
  --chart-2: oklch(0.652 0.138 144.111);
  --chart-3: oklch(0.652 0.138 144.111);
  --chart-4: oklch(0.674 0.135 144.229);
  --chart-5: oklch(0.575 0.158 328.013);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.007 326.109);
  --muted: oklch(0.184 0.008 145.688);
  --muted-foreground: oklch(0.697 0.044 145.522);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.975 0.007 326.109);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.975 0.007 326.109);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.574 0.146 327.883);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.652 0.138 144.111);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.652 0.138 144.111);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.561 0.202 31.562);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.574 0.146 327.883);
  --chart-1: oklch(0.574 0.146 327.883);
  --chart-2: oklch(0.652 0.138 144.111);
  --chart-3: oklch(0.652 0.138 144.111);
  --chart-4: oklch(0.674 0.135 144.229);
  --chart-5: oklch(0.575 0.158 328.013);
}