Dial for shadcn/ui

Dial is a shadcn/ui theme built around a near-black primary color (#010403) with near-black accents (#040102). The light mode uses a neutral background (#f7fcfb). Dark mode keeps the near-black primary (#010403) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7fcfbmintcream
#000000black
Foreground
#020907black
#fcfdfdwhite
Card
#f4fbfamintcream
#030303black
Card foreground
#010404black
#ffffffwhite
Popover
#f4fbfamintcream
#030303black
Popover foreground
#010404black
#ffffffwhite
Primary
#010403black
#010403black
Primary foreground
#369b88mediumseagreen
#369b88mediumseagreen
Secondary
#040102black
#040102black
Secondary foreground
#e6b7c0lightpink
#e6b7c0lightpink
Muted
#ece4e6linen
#1b1315black
Muted foreground
#69595cdimgray
#a69699darkgray
Accent
#040102black
#040102black
Accent foreground
#e6b7c0lightpink
#e6b7c0lightpink
Destructive
#b51608firebrick
#eb1d0ared
Destructive foreground
#fef1f0seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#010403black
#010403black

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.62:1AAA
Primary button6.08:1AA
Secondary button11.76:1AAA
Muted text5.28:1AA
Accent11.76:1AAA
Destructive6.17:1AA
Dark mode
Text on background20.60:1AAA
Text on card20.67:1AAA
Primary button6.08:1AA
Secondary button11.76:1AAA
Muted text6.46:1AA
Accent11.76:1AAA
Destructive4.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.005 184.165);
  --foreground: oklch(0.127 0.017 184.036);
  --muted: oklch(0.926 0.008 4.545);
  --muted-foreground: oklch(0.481 0.021 5.434);
  --popover: oklch(0.982 0.008 184.09);
  --popover-foreground: oklch(0.101 0.013 184.036);
  --card: oklch(0.982 0.008 184.09);
  --card-foreground: oklch(0.101 0.013 184.036);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.098 0.01 184.104);
  --primary-foreground: oklch(0.626 0.096 178.513);
  --secondary: oklch(0.084 0.012 4.647);
  --secondary-foreground: oklch(0.824 0.055 6.037);
  --accent: oklch(0.084 0.012 4.647);
  --accent-foreground: oklch(0.824 0.055 6.037);
  --destructive: oklch(0.494 0.192 30.099);
  --destructive-foreground: oklch(0.969 0.014 23.726);
  --ring: oklch(0.098 0.01 184.104);
  --chart-1: oklch(0.098 0.01 184.104);
  --chart-2: oklch(0.084 0.012 4.647);
  --chart-3: oklch(0.084 0.012 4.647);
  --chart-4: oklch(0.135 0.02 5.685);
  --chart-5: oklch(0.098 0.01 184.093);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 184.286);
  --muted: oklch(0.198 0.012 5.931);
  --muted-foreground: oklch(0.689 0.019 5.026);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.098 0.01 184.104);
  --primary-foreground: oklch(0.626 0.096 178.513);
  --secondary: oklch(0.084 0.012 4.647);
  --secondary-foreground: oklch(0.824 0.055 6.037);
  --accent: oklch(0.084 0.012 4.647);
  --accent-foreground: oklch(0.824 0.055 6.037);
  --destructive: oklch(0.598 0.235 30.045);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.098 0.01 184.104);
  --chart-1: oklch(0.098 0.01 184.104);
  --chart-2: oklch(0.084 0.012 4.647);
  --chart-3: oklch(0.084 0.012 4.647);
  --chart-4: oklch(0.135 0.02 5.685);
  --chart-5: oklch(0.098 0.01 184.093);
}