Purple Pristine Ocelot for shadcn/ui

Purple Pristine Ocelot is a shadcn/ui theme built around a violet primary color (#7135b1) with muted violet accents (#bfb1ce). The light mode uses a neutral background (#faf8fc). Dark mode keeps the violet primary (#7135b1) on a violet-tinted background (#0a070d).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#0a070dblack
Foreground
#020104black
#faf9fbghostwhite
Card
#f7f4fbghostwhite
#0d0911black
Card foreground
#000000black
#fcfcfdwhite
Popover
#faf8fcghostwhite
#0a070dblack
Popover foreground
#020104black
#faf9fbghostwhite
Primary
#7135b1rebeccapurple
#7135b1rebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d1cad8lightgrey
#2e2b31darkslategray
Secondary foreground
#383041darkslategray
#c7c4casilver
Muted
#f2f0f4whitesmoke
#0d0b0fblack
Muted foreground
#5e5865dimgray
#a09aa7darkgray
Accent
#bfb1cesilver
#42384cdarkslategray
Accent foreground
#261d2fdarkslategray
#dbd6e1gainsboro
Destructive
#6f0c0cmaroon
#ec4646tomato
Destructive foreground
#f7b5b5lightpink
#ffffffwhite
Border
#ededeewhitesmoke
#212022black
Input
#ededeewhitesmoke
#212022black
Ring
#7135b1rebeccapurple
#7135b1rebeccapurple

Contrast

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

Light mode
Text on background19.66:1AAA
Text on card19.27:1AAA
Primary button7.40:1AAA
Secondary button7.89:1AAA
Muted text6.06:1AA
Accent7.97:1AAA
Destructive7.07:1AAA
Dark mode
Text on background19.05:1AAA
Text on card19.26:1AAA
Primary button7.40:1AAA
Secondary button8.08:1AAA
Muted text7.17:1AAA
Accent7.70:1AAA
Destructive3.79:1AA Large

CSS variables

Paste this into your globals.css to use Purple Pristine Ocelot in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.007 307.71);
  --foreground: oklch(0.08 0.019 309.474);
  --muted: oklch(0.958 0.006 307.714);
  --muted-foreground: oklch(0.47 0.022 307.234);
  --popover: oklch(0.981 0.007 307.71);
  --popover-foreground: oklch(0.08 0.019 309.474);
  --card: oklch(0.971 0.01 307.669);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.946 0.002 307.77);
  --input: oklch(0.946 0.002 307.77);
  --primary: oklch(0.473 0.187 301.702);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.849 0.02 307.512);
  --secondary-foreground: oklch(0.324 0.031 306.659);
  --accent: oklch(0.78 0.044 307.135);
  --accent-foreground: oklch(0.251 0.035 306.154);
  --destructive: oklch(0.347 0.132 27.612);
  --destructive-foreground: oklch(0.835 0.077 18.829);
  --ring: oklch(0.473 0.187 301.702);
  --chart-1: oklch(0.473 0.187 301.702);
  --chart-2: oklch(0.849 0.02 307.512);
  --chart-3: oklch(0.78 0.044 307.135);
  --chart-4: oklch(0.875 0.017 307.566);
  --chart-5: oklch(0.472 0.195 301.206);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.015 307.547);
  --foreground: oklch(0.983 0.003 307.753);
  --muted: oklch(0.152 0.01 307.044);
  --muted-foreground: oklch(0.696 0.02 307.448);
  --popover: oklch(0.137 0.015 307.547);
  --popover-foreground: oklch(0.983 0.003 307.753);
  --card: oklch(0.148 0.017 306.519);
  --card-foreground: oklch(0.992 0.002 307.771);
  --border: oklch(0.246 0.004 307.601);
  --input: oklch(0.246 0.004 307.601);
  --primary: oklch(0.473 0.187 301.702);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.295 0.011 307.373);
  --secondary-foreground: oklch(0.823 0.01 307.648);
  --accent: oklch(0.36 0.036 306.62);
  --accent-foreground: oklch(0.883 0.016 307.584);
  --destructive: oklch(0.634 0.202 25.045);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.473 0.187 301.702);
  --chart-1: oklch(0.473 0.187 301.702);
  --chart-2: oklch(0.295 0.011 307.373);
  --chart-3: oklch(0.36 0.036 306.62);
  --chart-4: oklch(0.324 0.012 307.359);
  --chart-5: oklch(0.472 0.195 301.206);
}