Cable for shadcn/ui

Cable is a shadcn/ui theme built around a vivid violet primary color (#3d059e) with vivid green accents (#669e05). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#3d059e) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#ffffffwhite
#050307black
Foreground
#0a0316black
#ffffffwhite
Card
#fcfcfcsnow
#07050ablack
Card foreground
#080312black
#ffffffwhite
Popover
#fcfcfcsnow
#07050ablack
Popover foreground
#080312black
#ffffffwhite
Primary
#3d059eindigo
#3d059eindigo
Primary foreground
#e5d7felavender
#e5d7felavender
Secondary
#669e05olivedrab
#669e05olivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ecefe7linen
#151810black
Muted foreground
#5f625bdimgray
#a2a49ddarkgray
Accent
#669e05olivedrab
#669e05olivedrab
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d3420dchocolate
#f1561echocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3d059eindigo
#3d059eindigo

Contrast

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

Light mode
Text on background20.24:1AAA
Text on card19.90:1AAA
Primary button9.02:1AAA
Secondary button3.24:1AA Large
Muted text5.32:1AA
Accent3.24:1AA Large
Destructive4.60:1AA
Dark mode
Text on background20.52:1AAA
Text on card20.29:1AAA
Primary button9.02:1AAA
Secondary button3.24:1AA Large
Muted text7.09:1AAA
Accent3.24:1AA Large
Destructive3.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.13 0.045 300.106);
  --muted: oklch(0.947 0.011 123.111);
  --muted-foreground: oklch(0.492 0.012 123.312);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.12 0.04 302.007);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.12 0.04 302.007);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.356 0.203 285.569);
  --primary-foreground: oklch(0.904 0.054 302.018);
  --secondary: oklch(0.637 0.171 130.449);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.637 0.171 130.449);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.583 0.189 36.921);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.356 0.203 285.569);
  --chart-1: oklch(0.356 0.203 285.569);
  --chart-2: oklch(0.637 0.171 130.449);
  --chart-3: oklch(0.637 0.171 130.449);
  --chart-4: oklch(0.68 0.183 130.543);
  --chart-5: oklch(0.357 0.207 284.829);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.106 0.013 303.401);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.205 0.016 124.179);
  --muted-foreground: oklch(0.716 0.011 123.168);
  --popover: oklch(0.122 0.015 303.396);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.015 303.396);
  --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.356 0.203 285.569);
  --primary-foreground: oklch(0.904 0.054 302.018);
  --secondary: oklch(0.637 0.171 130.449);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.637 0.171 130.449);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.655 0.2 37.975);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.356 0.203 285.569);
  --chart-1: oklch(0.356 0.203 285.569);
  --chart-2: oklch(0.637 0.171 130.449);
  --chart-3: oklch(0.637 0.171 130.449);
  --chart-4: oklch(0.68 0.183 130.543);
  --chart-5: oklch(0.357 0.207 284.829);
}