Novel for shadcn/ui

Novel is a shadcn/ui theme built around an indigo primary color (#7370c2) with yellow accents (#bfc270). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the indigo primary (#7370c2) on a neutral background (#030307).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#030307black
Foreground
#020208black
#fcfcfdwhite
Card
#f8f8fcghostwhite
#030307black
Card foreground
#020208black
#fcfcfdwhite
Popover
#f8f8fcghostwhite
#030307black
Popover foreground
#020208black
#fcfcfdwhite
Primary
#7370c2slateblue
#7370c2slateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#bfc270darkkhaki
#bfc270darkkhaki
Secondary foreground
#000000black
#000000black
Muted
#eeeeecwhitesmoke
#131311black
Muted foreground
#52524cdarkslategray
#b3b3addarkgray
Accent
#bfc270darkkhaki
#bfc270darkkhaki
Accent foreground
#000000black
#000000black
Destructive
#853205saddlebrown
#f15a09orangered
Destructive foreground
#fdd5bfpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7370c2slateblue
#7370c2slateblue

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.50:1AAA
Primary button4.34:1AA Large
Secondary button11.15:1AAA
Muted text6.79:1AA
Accent11.15:1AAA
Destructive6.31:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button4.34:1AA Large
Secondary button11.15:1AAA
Muted text8.82:1AAA
Accent11.15:1AAA
Destructive3.37: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.98 0.006 287.832);
  --foreground: oklch(0.09 0.026 282.472);
  --muted: oklch(0.95 0.003 108.004);
  --muted-foreground: oklch(0.437 0.01 108.362);
  --popover: oklch(0.98 0.006 287.832);
  --popover-foreground: oklch(0.09 0.026 282.472);
  --card: oklch(0.98 0.006 287.832);
  --card-foreground: oklch(0.09 0.026 282.472);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.585 0.123 283.421);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.793 0.105 110.226);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.793 0.105 110.226);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.43 0.125 42.605);
  --destructive-foreground: oklch(0.9 0.054 49.951);
  --ring: oklch(0.585 0.123 283.421);
  --chart-1: oklch(0.585 0.123 283.421);
  --chart-2: oklch(0.793 0.105 110.226);
  --chart-3: oklch(0.793 0.105 110.226);
  --chart-4: oklch(0.809 0.098 110.037);
  --chart-5: oklch(0.578 0.132 282.957);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.013 285.794);
  --foreground: oklch(0.992 0.001 287.926);
  --muted: oklch(0.186 0.005 108.423);
  --muted-foreground: oklch(0.765 0.009 108.152);
  --popover: oklch(0.103 0.013 285.794);
  --popover-foreground: oklch(0.992 0.001 287.926);
  --card: oklch(0.103 0.013 285.794);
  --card-foreground: oklch(0.992 0.001 287.926);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.585 0.123 283.421);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.793 0.105 110.226);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.793 0.105 110.226);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.66 0.2 41.107);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.585 0.123 283.421);
  --chart-1: oklch(0.585 0.123 283.421);
  --chart-2: oklch(0.793 0.105 110.226);
  --chart-3: oklch(0.793 0.105 110.226);
  --chart-4: oklch(0.809 0.098 110.037);
  --chart-5: oklch(0.578 0.132 282.957);
}