Stylish for shadcn/ui

Stylish is a shadcn/ui theme built around a vivid violet primary color (#6514fa) with vivid purple accents (#d814fa). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#6514fa) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#06030dblack
#faf9fbghostwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#040208black
#fcfcfdwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#06030dblack
#faf9fbghostwhite
Primary
#6514fablueviolet
#6514fablueviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#1437fablue
#1437fablue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d9dae3gainsboro
#1c1d26black
Muted foreground
#5a5d6cdimgray
#9395a5darkgray
Accent
#d814famagenta
#d814famagenta
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#982901saddlebrown
#f94301orangered
Destructive foreground
#ffdaccbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6514fablueviolet
#6514fablueviolet

Contrast

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

Light mode
Text on background20.45:1AAA
Text on card20.19:1AAA
Primary button6.92:1AA
Secondary button7.11:1AAA
Muted text4.69:1AA
Accent3.89:1AA Large
Destructive6.07:1AA
Dark mode
Text on background20.00:1AAA
Text on card20.16:1AAA
Primary button6.92:1AA
Secondary button7.11:1AAA
Muted text5.63:1AA
Accent3.89:1AA Large
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.111 0.029 302.699);
  --muted: oklch(0.89 0.012 278.114);
  --muted-foreground: oklch(0.482 0.025 277.526);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.111 0.029 302.699);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.097 0.025 303.038);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.503 0.284 285.202);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.486 0.281 265.342);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.644 0.302 320.216);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.453 0.153 36.492);
  --destructive-foreground: oklch(0.915 0.045 41.008);
  --ring: oklch(0.503 0.284 285.202);
  --chart-1: oklch(0.503 0.284 285.202);
  --chart-2: oklch(0.486 0.281 265.342);
  --chart-3: oklch(0.644 0.302 320.216);
  --chart-4: oklch(0.507 0.268 266.496);
  --chart-5: oklch(0.505 0.289 284.446);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.002 302.187);
  --muted: oklch(0.235 0.017 277.124);
  --muted-foreground: oklch(0.674 0.023 277.812);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.002 302.187);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 302.2);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.503 0.284 285.202);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.486 0.281 265.342);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.644 0.302 320.216);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.648 0.225 35.365);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.503 0.284 285.202);
  --chart-1: oklch(0.503 0.284 285.202);
  --chart-2: oklch(0.486 0.281 265.342);
  --chart-3: oklch(0.644 0.302 320.216);
  --chart-4: oklch(0.507 0.268 266.496);
  --chart-5: oklch(0.505 0.289 284.446);
}