Dragster for shadcn/ui

Dragster is a shadcn/ui theme built around a vivid violet primary color (#4e0bc1) with vivid green accents (#0bc14e). The light mode uses a neutral background (#fcfbfd). Dark mode keeps the vivid violet primary (#4e0bc1) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfbfdsnow
#000000black
Foreground
#0a0416black
#f7f4fawhitesmoke
Card
#fcfbfdsnow
#000000black
Card foreground
#0a0416black
#f7f4fawhitesmoke
Popover
#fcfbfdsnow
#000000black
Popover foreground
#0a0416black
#f7f4fawhitesmoke
Primary
#4e0bc1rebeccapurple
#4e0bc1rebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#c14e0bchocolate
#c14e0bchocolate
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ece7e4linen
#1b1613black
Muted foreground
#60544ddimgray
#b2a69fdarkgray
Accent
#0bc14elimegreen
#0bc14elimegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#651906maroon
#f24318orangered
Destructive foreground
#fab5a3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4e0bc1rebeccapurple
#4e0bc1rebeccapurple

Contrast

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

Light mode
Text on background19.60:1AAA
Text on card19.60:1AAA
Primary button9.81:1AAA
Secondary button4.82:1AA
Muted text5.95:1AA
Accent2.40:1Fail
Destructive7.19:1AAA
Dark mode
Text on background19.27:1AAA
Text on card19.27:1AAA
Primary button9.81:1AAA
Secondary button4.82:1AA
Muted text7.56:1AAA
Accent2.40:1Fail
Destructive3.76:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 302.886);
  --foreground: oklch(0.132 0.041 300.22);
  --muted: oklch(0.931 0.007 52.483);
  --muted-foreground: oklch(0.456 0.02 52.029);
  --popover: oklch(0.991 0.003 302.886);
  --popover-foreground: oklch(0.132 0.041 300.22);
  --card: oklch(0.991 0.003 302.886);
  --card-foreground: oklch(0.132 0.041 300.22);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.415 0.234 286.135);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.568 0.162 43.492);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.707 0.203 147.83);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.339 0.112 34.592);
  --destructive-foreground: oklch(0.832 0.085 34.532);
  --ring: oklch(0.415 0.234 286.135);
  --chart-1: oklch(0.415 0.234 286.135);
  --chart-2: oklch(0.568 0.162 43.492);
  --chart-3: oklch(0.707 0.203 147.83);
  --chart-4: oklch(0.598 0.172 43.347);
  --chart-5: oklch(0.417 0.238 285.333);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.971 0.008 302.796);
  --muted: oklch(0.205 0.01 51.968);
  --muted-foreground: oklch(0.733 0.017 52.269);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.971 0.008 302.796);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.971 0.008 302.796);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.415 0.234 286.135);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.568 0.162 43.492);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.707 0.203 147.83);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.637 0.217 34.095);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.415 0.234 286.135);
  --chart-1: oklch(0.415 0.234 286.135);
  --chart-2: oklch(0.568 0.162 43.492);
  --chart-3: oklch(0.707 0.203 147.83);
  --chart-4: oklch(0.598 0.172 43.347);
  --chart-5: oklch(0.417 0.238 285.333);
}