Slim for shadcn/ui

Slim is a shadcn/ui theme built around a vivid violet primary color (#9c0ce4) with muted light violet accents (#d6ced9). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the vivid violet primary (#9c0ce4) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#030104black
Foreground
#0f0515black
#fdfcfdwhite
Card
#fdfbfdsnow
#030104black
Card foreground
#0f0515black
#fdfcfdwhite
Popover
#fdfbfdsnow
#030104black
Popover foreground
#0f0515black
#fdfcfdwhite
Primary
#9c0ce4darkviolet
#9c0ce4darkviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d6ced9lightgrey
#292929darkslategray
Secondary foreground
#3d3342darkslategray
#c2c2c2silver
Muted
#dcd0e2gainsboro
#2f1d1dblack
Muted foreground
#5f5365dimgray
#ac9a9adarkgray
Accent
#d6ced9lightgrey
#292929darkslategray
Accent foreground
#3d3342darkslategray
#c2c2c2silver
Destructive
#dd5608chocolate
#f77326tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9c0ce4darkviolet
#9c0ce4darkviolet

Contrast

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

Light mode
Text on background19.42:1AAA
Text on card19.42:1AAA
Primary button5.86:1AA
Secondary button7.81:1AAA
Muted text4.85:1AA
Accent7.81:1AAA
Destructive3.86:1AA Large
Dark mode
Text on background20.31:1AAA
Text on card20.31:1AAA
Primary button5.86:1AA
Secondary button8.18:1AAA
Muted text5.94:1AA
Accent8.18:1AAA
Destructive7.43:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 314.813);
  --foreground: oklch(0.142 0.04 314.284);
  --muted: oklch(0.872 0.027 314.676);
  --muted-foreground: oklch(0.46 0.033 314.479);
  --popover: oklch(0.991 0.003 314.813);
  --popover-foreground: oklch(0.142 0.04 314.284);
  --card: oklch(0.991 0.003 314.813);
  --card-foreground: oklch(0.142 0.04 314.284);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.542 0.272 308.276);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.861 0.017 314.729);
  --secondary-foreground: oklch(0.338 0.03 314.402);
  --accent: oklch(0.861 0.017 314.729);
  --accent-foreground: oklch(0.338 0.03 314.402);
  --destructive: oklch(0.624 0.184 42.479);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.542 0.272 308.276);
  --chart-1: oklch(0.542 0.272 308.276);
  --chart-2: oklch(0.861 0.017 314.729);
  --chart-3: oklch(0.861 0.017 314.729);
  --chart-4: oklch(0.886 0.014 314.749);
  --chart-5: oklch(0.546 0.276 307.918);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.082 0.02 316.905);
  --foreground: oklch(0.991 0.002 314.817);
  --muted: oklch(0.255 0.028 19.162);
  --muted-foreground: oklch(0.702 0.022 17.681);
  --popover: oklch(0.082 0.02 316.905);
  --popover-foreground: oklch(0.991 0.002 314.817);
  --card: oklch(0.082 0.02 316.905);
  --card-foreground: oklch(0.991 0.002 314.817);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.542 0.272 308.276);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.28 0 180);
  --secondary-foreground: oklch(0.813 0 165.964);
  --accent: oklch(0.28 0 180);
  --accent-foreground: oklch(0.813 0 165.964);
  --destructive: oklch(0.703 0.182 45.907);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.542 0.272 308.276);
  --chart-1: oklch(0.542 0.272 308.276);
  --chart-2: oklch(0.28 0 180);
  --chart-3: oklch(0.28 0 180);
  --chart-4: oklch(0.311 0 180);
  --chart-5: oklch(0.546 0.276 307.918);
}