Slope for shadcn/ui

Slope is a shadcn/ui theme built around a violet primary color (#ce8ced) with purple accents (#ed8cdb). The light mode uses a neutral background (#fbf7fd). Dark mode keeps the violet primary (#ce8ced) on a violet-tinted background (#09050a).

Color palette

TokenLightDark
Background
#fbf7fdghostwhite
#09050ablack
Foreground
#0a020dblack
#ffffffwhite
Card
#fbf7fdghostwhite
#09050ablack
Card foreground
#0a020dblack
#ffffffwhite
Popover
#fbf7fdghostwhite
#09050ablack
Popover foreground
#0a020dblack
#ffffffwhite
Primary
#ce8cedplum
#ce8cedplum
Primary foreground
#2d0a3emidnightblue
#2d0a3emidnightblue
Secondary
#9e8cedmediumpurple
#9e8cedmediumpurple
Secondary foreground
#130a3emidnightblue
#130a3emidnightblue
Muted
#dddbe6gainsboro
#1b1924black
Muted foreground
#403e4cdarkslategray
#b6b3c1silver
Accent
#ed8cdbviolet
#ed8cdbviolet
Accent foreground
#3e0a34midnightblue
#3e0a34midnightblue
Destructive
#82240dsaddlebrown
#e33f16orangered
Destructive foreground
#f9d1c7peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ce8cedplum
#ce8cedplum

Contrast

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

Light mode
Text on background19.31:1AAA
Text on card19.31:1AAA
Primary button7.04:1AAA
Secondary button6.52:1AA
Muted text7.64:1AAA
Accent7.24:1AAA
Destructive6.77:1AA
Dark mode
Text on background20.23:1AAA
Text on card20.23:1AAA
Primary button7.04:1AAA
Secondary button6.52:1AA
Muted text8.39:1AAA
Accent7.24:1AAA
Destructive4.18:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 315.393);
  --foreground: oklch(0.115 0.037 317.456);
  --muted: oklch(0.897 0.014 294.529);
  --muted-foreground: oklch(0.372 0.024 293.628);
  --popover: oklch(0.981 0.008 315.393);
  --popover-foreground: oklch(0.115 0.037 317.456);
  --card: oklch(0.981 0.008 315.393);
  --card-foreground: oklch(0.115 0.037 317.456);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.742 0.151 314.492);
  --primary-foreground: oklch(0.236 0.096 312.527);
  --secondary: oklch(0.697 0.14 290.733);
  --secondary-foreground: oklch(0.201 0.093 282.474);
  --accent: oklch(0.768 0.152 334.002);
  --accent-foreground: oklch(0.258 0.096 336.548);
  --destructive: oklch(0.407 0.132 34.543);
  --destructive-foreground: oklch(0.893 0.047 34.342);
  --ring: oklch(0.742 0.151 314.492);
  --chart-1: oklch(0.742 0.151 314.492);
  --chart-2: oklch(0.697 0.14 290.733);
  --chart-3: oklch(0.768 0.152 334.002);
  --chart-4: oklch(0.732 0.123 291.476);
  --chart-5: oklch(0.741 0.157 314.444);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.015 316.51);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.222 0.02 293.084);
  --muted-foreground: oklch(0.774 0.02 294.353);
  --popover: oklch(0.125 0.015 316.51);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.125 0.015 316.51);
  --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.742 0.151 314.492);
  --primary-foreground: oklch(0.236 0.096 312.527);
  --secondary: oklch(0.697 0.14 290.733);
  --secondary-foreground: oklch(0.201 0.093 282.474);
  --accent: oklch(0.768 0.152 334.002);
  --accent-foreground: oklch(0.258 0.096 336.548);
  --destructive: oklch(0.609 0.206 34.144);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.742 0.151 314.492);
  --chart-1: oklch(0.742 0.151 314.492);
  --chart-2: oklch(0.697 0.14 290.733);
  --chart-3: oklch(0.768 0.152 334.002);
  --chart-4: oklch(0.732 0.123 291.476);
  --chart-5: oklch(0.741 0.157 314.444);
}