Novel for shadcn/ui

Novel is a shadcn/ui theme built around a deep pink primary color (#2c0c21) with deep green accents (#0c2c17). The light mode uses a neutral background (#fdf7fb). Dark mode keeps the deep pink primary (#2c0c21) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#fdf7fbsnow
#040103black
Foreground
#0c0409black
#fbf9fasnow
Card
#fcf2f9lavenderblush
#080206black
Card foreground
#080206black
#fdfcfdwhite
Popover
#fdf7fbsnow
#040103black
Popover foreground
#0c0409black
#fbf9fasnow
Primary
#2c0c21black
#2c0c21black
Primary foreground
#e08ac3orchid
#e08ac3orchid
Secondary
#0c2c17black
#0c2c17black
Secondary foreground
#3acb6amediumseagreen
#3acb6amediumseagreen
Muted
#e0e6e2gainsboro
#191f1bblack
Muted foreground
#495b4fdarkslategray
#a4b6aadarkgray
Accent
#0c2c17black
#0c2c17black
Accent foreground
#3acb6amediumseagreen
#3acb6amediumseagreen
Destructive
#b51d12firebrick
#d12115firebrick
Destructive foreground
#fffbfasnow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2c0c21black
#2c0c21black

Contrast

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

Light mode
Text on background19.12:1AAA
Text on card18.85:1AAA
Primary button7.26:1AAA
Secondary button7.13:1AAA
Muted text5.72:1AA
Accent7.13:1AAA
Destructive6.49:1AA
Dark mode
Text on background19.80:1AAA
Text on card20.05:1AAA
Primary button7.26:1AAA
Secondary button7.13:1AAA
Muted text7.86:1AAA
Accent7.13:1AAA
Destructive5.33:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.009 337.452);
  --foreground: oklch(0.123 0.023 337.874);
  --muted: oklch(0.919 0.008 157.092);
  --muted-foreground: oklch(0.451 0.029 155.859);
  --popover: oklch(0.981 0.009 337.452);
  --popover-foreground: oklch(0.123 0.023 337.874);
  --card: oklch(0.972 0.014 337.548);
  --card-foreground: oklch(0.108 0.02 337.633);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.217 0.062 342.732);
  --primary-foreground: oklch(0.741 0.126 340.445);
  --secondary: oklch(0.264 0.056 151.578);
  --secondary-foreground: oklch(0.743 0.182 150.04);
  --accent: oklch(0.264 0.056 151.578);
  --accent-foreground: oklch(0.743 0.182 150.04);
  --destructive: oklch(0.498 0.187 29.606);
  --destructive-foreground: oklch(0.99 0.004 22.262);
  --ring: oklch(0.217 0.062 342.732);
  --chart-1: oklch(0.217 0.062 342.732);
  --chart-2: oklch(0.264 0.056 151.578);
  --chart-3: oklch(0.264 0.056 151.578);
  --chart-4: oklch(0.305 0.067 151.173);
  --chart-5: oklch(0.218 0.065 343.002);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.017 337.649);
  --foreground: oklch(0.984 0.003 337.32);
  --muted: oklch(0.231 0.011 156.267);
  --muted-foreground: oklch(0.76 0.026 156.549);
  --popover: oklch(0.085 0.017 337.649);
  --popover-foreground: oklch(0.984 0.003 337.32);
  --card: oklch(0.107 0.021 337.649);
  --card-foreground: oklch(0.992 0.001 337.292);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.217 0.062 342.732);
  --primary-foreground: oklch(0.741 0.126 340.445);
  --secondary: oklch(0.264 0.056 151.578);
  --secondary-foreground: oklch(0.743 0.182 150.04);
  --accent: oklch(0.264 0.056 151.578);
  --accent-foreground: oklch(0.743 0.182 150.04);
  --destructive: oklch(0.553 0.21 29.645);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.217 0.062 342.732);
  --chart-1: oklch(0.217 0.062 342.732);
  --chart-2: oklch(0.264 0.056 151.578);
  --chart-3: oklch(0.264 0.056 151.578);
  --chart-4: oklch(0.305 0.067 151.173);
  --chart-5: oklch(0.218 0.065 343.002);
}