Unwritten for shadcn/ui

Unwritten is a shadcn/ui theme built around a violet primary color (#5a2f92) with green accents (#2f925a). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#5a2f92) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfbfewhite
#000000black
Foreground
#020104black
#fcfcfdwhite
Card
#fcfbfewhite
#000000black
Card foreground
#020104black
#fcfcfdwhite
Popover
#fcfbfewhite
#000000black
Popover foreground
#020104black
#fcfcfdwhite
Primary
#5a2f92rebeccapurple
#5a2f92rebeccapurple
Primary foreground
#faf7fdghostwhite
#faf7fdghostwhite
Secondary
#925a2fsienna
#925a2fsienna
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ece7e4linen
#1b1613black
Muted foreground
#4c443edarkslategray
#c1b9b3silver
Accent
#2f925aseagreen
#2f925aseagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#802b0asaddlebrown
#d54810chocolate
Destructive foreground
#fad1c1peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5a2f92rebeccapurple
#5a2f92rebeccapurple

Contrast

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

Light mode
Text on background20.19:1AAA
Text on card20.19:1AAA
Primary button8.71:1AAA
Secondary button5.61:1AA
Muted text7.79:1AAA
Accent3.88:1AA Large
Destructive6.58:1AA
Dark mode
Text on background20.48:1AAA
Text on card20.48:1AAA
Primary button8.71:1AAA
Secondary button5.61:1AA
Muted text9.24:1AAA
Accent3.88:1AA Large
Destructive4.39:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 305.684);
  --foreground: oklch(0.076 0.024 307.622);
  --muted: oklch(0.932 0.007 60.175);
  --muted-foreground: oklch(0.392 0.015 59.768);
  --popover: oklch(0.99 0.004 305.684);
  --popover-foreground: oklch(0.076 0.024 307.622);
  --card: oklch(0.99 0.004 305.684);
  --card-foreground: oklch(0.076 0.024 307.622);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.417 0.155 299.479);
  --primary-foreground: oklch(0.98 0.007 305.641);
  --secondary: oklch(0.523 0.094 56.215);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.589 0.125 154.496);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.412 0.124 38.903);
  --destructive-foreground: oklch(0.893 0.051 42.72);
  --ring: oklch(0.417 0.155 299.479);
  --chart-1: oklch(0.417 0.155 299.479);
  --chart-2: oklch(0.523 0.094 56.215);
  --chart-3: oklch(0.589 0.125 154.496);
  --chart-4: oklch(0.552 0.1 56.152);
  --chart-5: oklch(0.414 0.162 298.948);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 305.729);
  --muted: oklch(0.206 0.011 59.541);
  --muted-foreground: oklch(0.791 0.012 60.072);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 305.729);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.001 305.729);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.417 0.155 299.479);
  --primary-foreground: oklch(0.98 0.007 305.641);
  --secondary: oklch(0.523 0.094 56.215);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.589 0.125 154.496);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.594 0.187 38.114);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.417 0.155 299.479);
  --chart-1: oklch(0.417 0.155 299.479);
  --chart-2: oklch(0.523 0.094 56.215);
  --chart-3: oklch(0.589 0.125 154.496);
  --chart-4: oklch(0.552 0.1 56.152);
  --chart-5: oklch(0.414 0.162 298.948);
}