Digital for shadcn/ui

Digital is a shadcn/ui theme built around a purple primary color (#c077b2) with pink accents (#c0778d). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#c077b2) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#ffffffwhite
#040103black
Foreground
#080207black
#ffffffwhite
Card
#fcfcfcsnow
#080207black
Card foreground
#040103black
#ffffffwhite
Popover
#ffffffwhite
#040103black
Popover foreground
#080207black
#ffffffwhite
Primary
#c077b2palevioletred
#c077b2palevioletred
Primary foreground
#030203black
#030203black
Secondary
#aa77c0mediumpurple
#aa77c0mediumpurple
Secondary foreground
#030203black
#030203black
Muted
#dfcae7thistle
#2c1835darkslategray
Muted foreground
#4d4252darkslategray
#b8adbdsilver
Accent
#c0778drosybrown
#c0778drosybrown
Accent foreground
#030202black
#030202black
Destructive
#8b1f09darkred
#f24d2ctomato
Destructive foreground
#fcd2capink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c077b2palevioletred
#c077b2palevioletred

Contrast

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

Light mode
Text on background20.54:1AAA
Text on card20.32:1AAA
Primary button6.42:1AA
Secondary button6.02:1AA
Muted text6.20:1AA
Accent6.17:1AA
Destructive6.63:1AA
Dark mode
Text on background20.76:1AAA
Text on card20.53:1AAA
Primary button6.42:1AA
Secondary button6.02:1AA
Muted text7.57:1AAA
Accent6.17:1AA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.108 0.021 332.834);
  --muted: oklch(0.865 0.045 315.836);
  --muted-foreground: oklch(0.396 0.031 315.745);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.108 0.021 332.834);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.086 0.017 332.834);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.666 0.119 334.47);
  --primary-foreground: oklch(0.088 0.012 332.601);
  --secondary: oklch(0.648 0.12 315.306);
  --secondary-foreground: oklch(0.086 0.012 317.25);
  --accent: oklch(0.653 0.096 0.696);
  --accent-foreground: oklch(0.087 0.009 356.488);
  --destructive: oklch(0.418 0.147 32.74);
  --destructive-foreground: oklch(0.898 0.048 31.242);
  --ring: oklch(0.666 0.119 334.47);
  --chart-1: oklch(0.666 0.119 334.47);
  --chart-2: oklch(0.648 0.12 315.306);
  --chart-3: oklch(0.653 0.096 0.696);
  --chart-4: oklch(0.675 0.11 315.406);
  --chart-5: oklch(0.665 0.129 334.656);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.02 332.969);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.25 0.059 315.039);
  --muted-foreground: oklch(0.762 0.026 315.899);
  --popover: oklch(0.085 0.02 332.969);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.107 0.025 332.969);
  --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.666 0.119 334.47);
  --primary-foreground: oklch(0.088 0.012 332.601);
  --secondary: oklch(0.648 0.12 315.306);
  --secondary-foreground: oklch(0.086 0.012 317.25);
  --accent: oklch(0.653 0.096 0.696);
  --accent-foreground: oklch(0.087 0.009 356.488);
  --destructive: oklch(0.647 0.206 33.163);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.666 0.119 334.47);
  --chart-1: oklch(0.666 0.119 334.47);
  --chart-2: oklch(0.648 0.12 315.306);
  --chart-3: oklch(0.653 0.096 0.696);
  --chart-4: oklch(0.675 0.11 315.406);
  --chart-5: oklch(0.665 0.129 334.656);
}