Sophisticated for shadcn/ui

Sophisticated is a shadcn/ui theme built around a violet primary color (#b393d2) with muted light violet accents (#ebe7ee). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#b393d2) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#0d0515black
#fcfcfdwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#0a0410black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#0d0515black
#fcfcfdwhite
Primary
#b393d2plum
#b393d2plum
Primary foreground
#190f24black
#190f24black
Secondary
#ebe7eelavender
#302a37darkslategray
Secondary foreground
#52445fdarkslategray
#c9c2d0thistle
Muted
#dbd8dfgainsboro
#242027black
Muted foreground
#665e6edimgray
#9991a1darkgray
Accent
#ebe7eelavender
#302a37darkslategray
Accent foreground
#52445fdarkslategray
#c9c2d0thistle
Destructive
#671804maroon
#f54519orangered
Destructive foreground
#fbb4a2lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b393d2plum
#b393d2plum

Contrast

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

Light mode
Text on background20.00:1AAA
Text on card19.80:1AAA
Primary button7.06:1AAA
Secondary button7.31:1AAA
Muted text4.38:1AA Large
Accent7.31:1AAA
Destructive7.11:1AAA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button7.06:1AAA
Secondary button7.98:1AAA
Muted text5.27:1AA
Accent7.98:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.139 0.037 306.752);
  --muted: oklch(0.886 0.01 308.33);
  --muted-foreground: oklch(0.495 0.027 307.846);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.139 0.037 306.752);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.128 0.032 308.25);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.715 0.095 306.959);
  --primary-foreground: oklch(0.194 0.043 305.833);
  --secondary: oklch(0.933 0.01 308.342);
  --secondary-foreground: oklch(0.411 0.049 307.138);
  --accent: oklch(0.933 0.01 308.342);
  --accent-foreground: oklch(0.411 0.049 307.138);
  --destructive: oklch(0.341 0.115 34.572);
  --destructive-foreground: oklch(0.832 0.088 34.551);
  --ring: oklch(0.715 0.095 306.959);
  --chart-1: oklch(0.715 0.095 306.959);
  --chart-2: oklch(0.933 0.01 308.342);
  --chart-3: oklch(0.933 0.01 308.342);
  --chart-4: oklch(0.958 0.006 308.389);
  --chart-5: oklch(0.711 0.102 306.836);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 308.442);
  --muted: oklch(0.251 0.014 307.833);
  --muted-foreground: oklch(0.668 0.025 308.038);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.002 308.442);
  --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.715 0.095 306.959);
  --primary-foreground: oklch(0.194 0.043 305.833);
  --secondary: oklch(0.298 0.024 307.566);
  --secondary-foreground: oklch(0.825 0.021 308.183);
  --accent: oklch(0.298 0.024 307.566);
  --accent-foreground: oklch(0.825 0.021 308.183);
  --destructive: oklch(0.645 0.219 34.128);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.715 0.095 306.959);
  --chart-1: oklch(0.715 0.095 306.959);
  --chart-2: oklch(0.298 0.024 307.566);
  --chart-3: oklch(0.298 0.024 307.566);
  --chart-4: oklch(0.326 0.027 307.536);
  --chart-5: oklch(0.711 0.102 306.836);
}