Overcoat for shadcn/ui

Overcoat is a shadcn/ui theme built around a vivid violet primary color (#8515cb) with muted light violet accents (#d4c4de). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#8515cb) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#f8f5fawhitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#000000black
#f8f5fawhitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#000000black
#f8f5fawhitesmoke
Primary
#8515cbdarkviolet
#8515cbdarkviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e7e0eblavender
#281f2ddarkslategray
Secondary foreground
#503d5cdarkslategray
#c2b4cbsilver
Muted
#f2f1f3whitesmoke
#0d0c0eblack
Muted foreground
#434044darkslategray
#bdbbbfsilver
Accent
#d4c4dethistle
#392942darkslategray
Accent foreground
#3c2848darkslategray
#d1c3dathistle
Destructive
#671804maroon
#f63c0eorangered
Destructive foreground
#fcb4a1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8515cbdarkviolet
#8515cbdarkviolet

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.05:1AAA
Secondary button7.52:1AAA
Muted text9.09:1AAA
Accent8.03:1AAA
Destructive7.12:1AAA
Dark mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button7.05:1AAA
Secondary button8.04:1AAA
Muted text10.25:1AAA
Accent8.01:1AAA
Destructive3.75:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.96 0.003 312.964);
  --muted-foreground: oklch(0.377 0.007 312.851);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.495 0.244 306.072);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.916 0.015 312.872);
  --secondary-foreground: oklch(0.394 0.056 312.008);
  --accent: oklch(0.842 0.039 312.67);
  --accent-foreground: oklch(0.316 0.06 311.639);
  --destructive: oklch(0.342 0.116 34.571);
  --destructive-foreground: oklch(0.832 0.089 34.557);
  --ring: oklch(0.495 0.244 306.072);
  --chart-1: oklch(0.495 0.244 306.072);
  --chart-2: oklch(0.916 0.015 312.872);
  --chart-3: oklch(0.842 0.039 312.67);
  --chart-4: oklch(0.941 0.011 312.909);
  --chart-5: oklch(0.498 0.248 305.661);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.974 0.007 312.935);
  --muted: oklch(0.156 0.005 312.778);
  --muted-foreground: oklch(0.794 0.006 312.932);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.974 0.007 312.935);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.974 0.007 312.935);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.495 0.244 306.072);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.257 0.028 312.24);
  --secondary-foreground: oklch(0.788 0.036 312.68);
  --accent: oklch(0.31 0.049 311.87);
  --accent-foreground: oklch(0.836 0.036 312.697);
  --destructive: oklch(0.638 0.227 33.492);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.495 0.244 306.072);
  --chart-1: oklch(0.495 0.244 306.072);
  --chart-2: oklch(0.257 0.028 312.24);
  --chart-3: oklch(0.31 0.049 311.87);
  --chart-4: oklch(0.286 0.033 312.203);
  --chart-5: oklch(0.498 0.248 305.661);
}