Novel for shadcn/ui

Novel is a shadcn/ui theme built around a green primary color (#a2ea76) with muted light green accents (#c9d8c0). The light mode uses a neutral background (#fcfefb). Dark mode keeps the green primary (#a2ea76) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfefbwhite
#000000black
Foreground
#020401black
#fcfdfcwhite
Card
#f9fcf8mintcream
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfefbwhite
#000000black
Popover foreground
#020401black
#fcfdfcwhite
Primary
#a2ea76lightgreen
#a2ea76lightgreen
Primary foreground
#132806black
#132806black
Secondary
#dfe6dbgainsboro
#222a1dblack
Secondary foreground
#44543bdarkslategray
#bac9b1silver
Muted
#dbe9d3gainsboro
#1f2c16black
Muted foreground
#595b57dimgray
#a5a8a4darkgray
Accent
#c9d8c0lightgrey
#2d3e23darkslategray
Accent foreground
#303f27darkslategray
#c6d8bbsilver
Destructive
#ba0e08firebrick
#f52019red
Destructive foreground
#fff6f5lavenderblush
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a2ea76lightgreen
#a2ea76lightgreen

Contrast

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

Light mode
Text on background20.25:1AAA
Text on card20.34:1AAA
Primary button10.90:1AAA
Secondary button6.39:1AA
Muted text5.43:1AA
Accent7.55:1AAA
Destructive6.26:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.67:1AAA
Primary button10.90:1AAA
Secondary button8.50:1AAA
Muted text6.08:1AA
Accent7.67:1AAA
Destructive4.10:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 133.009);
  --foreground: oklch(0.099 0.015 131.6);
  --muted: oklch(0.918 0.034 133.241);
  --muted-foreground: oklch(0.468 0.006 133.078);
  --popover: oklch(0.994 0.003 133.009);
  --popover-foreground: oklch(0.099 0.015 131.6);
  --card: oklch(0.988 0.007 133.033);
  --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.864 0.165 134.687);
  --primary-foreground: oklch(0.249 0.062 135.474);
  --secondary: oklch(0.916 0.016 133.109);
  --secondary-foreground: oklch(0.426 0.046 133.795);
  --accent: oklch(0.865 0.037 133.286);
  --accent-foreground: oklch(0.348 0.045 134.005);
  --destructive: oklch(0.5 0.199 29.247);
  --destructive-foreground: oklch(0.979 0.01 19.746);
  --ring: oklch(0.864 0.165 134.687);
  --chart-1: oklch(0.864 0.165 134.687);
  --chart-2: oklch(0.916 0.016 133.109);
  --chart-3: oklch(0.865 0.037 133.286);
  --chart-4: oklch(0.937 0.012 133.076);
  --chart-5: oklch(0.868 0.17 134.765);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 132.992);
  --muted: oklch(0.275 0.044 134.297);
  --muted-foreground: oklch(0.727 0.006 133.039);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.001 132.992);
  --card: oklch(0.092 0 180);
  --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.864 0.165 134.687);
  --primary-foreground: oklch(0.249 0.062 135.474);
  --secondary: oklch(0.273 0.026 133.679);
  --secondary-foreground: oklch(0.817 0.037 133.3);
  --accent: oklch(0.34 0.048 134.126);
  --accent-foreground: oklch(0.861 0.044 133.344);
  --destructive: oklch(0.62 0.241 28.972);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.864 0.165 134.687);
  --chart-1: oklch(0.864 0.165 134.687);
  --chart-2: oklch(0.273 0.026 133.679);
  --chart-3: oklch(0.34 0.048 134.126);
  --chart-4: oklch(0.308 0.03 133.716);
  --chart-5: oklch(0.868 0.17 134.765);
}