One Dark Vivid for shadcn/ui

One Dark Vivid is a shadcn/ui theme built around a near-white primary color (#ffffff) with muted blue accents (#52576b). The light mode uses a blue-tinted background (#31343f). Dark mode keeps the near-white primary (#ffffff) on a blue-tinted background (#31343f).

Color palette

TokenLightDark
Background
#31343fdarkslategray
#31343fdarkslategray
Foreground
#dee2f7lavender
#dee2f7lavender
Card
#2d3039darkslategray
#2d3039darkslategray
Card foreground
#f3f4fcaliceblue
#f3f4fcaliceblue
Popover
#2b2d36darkslategray
#2b2d36darkslategray
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#3a3e4adarkslategray
#3a3e4adarkslategray
Muted foreground
#babec9silver
#babec9silver
Accent
#52576bdimgray
#52576bdimgray
Accent foreground
#f6f7f8whitesmoke
#f6f7f8whitesmoke
Destructive
#f54b38tomato
#f54b38tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#434446darkslategray
#434446darkslategray
Input
#4b4c4edarkslategray
#4b4c4edarkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background9.64:1AAA
Text on card12.08:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.74:1AA
Accent6.64:1AA
Destructive3.53:1AA Large
Dark mode
Text on background9.64:1AAA
Text on card12.08:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.74:1AA
Accent6.64:1AA
Destructive3.53:1AA Large

CSS variables

Paste this into your globals.css to use One Dark Vivid in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.327 0.021 273.047);
  --foreground: oklch(0.917 0.029 276.811);
  --muted: oklch(0.365 0.022 273.093);
  --muted-foreground: oklch(0.801 0.017 273.623);
  --popover: oklch(0.299 0.017 273.148);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.309 0.018 273.138);
  --card-foreground: oklch(0.969 0.01 277.109);
  --border: oklch(0.387 0.004 273.756);
  --input: oklch(0.415 0.004 273.754);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.461 0.032 272.96);
  --accent-foreground: oklch(0.976 0.002 273.842);
  --destructive: oklch(0.652 0.209 29.995);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.461 0.032 272.96);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.327 0.021 273.047);
  --foreground: oklch(0.917 0.029 276.811);
  --muted: oklch(0.365 0.022 273.093);
  --muted-foreground: oklch(0.801 0.017 273.623);
  --popover: oklch(0.299 0.017 273.148);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.309 0.018 273.138);
  --card-foreground: oklch(0.969 0.01 277.109);
  --border: oklch(0.387 0.004 273.756);
  --input: oklch(0.415 0.004 273.754);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.461 0.032 272.96);
  --accent-foreground: oklch(0.976 0.002 273.842);
  --destructive: oklch(0.652 0.209 29.995);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.461 0.032 272.96);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}