Single for shadcn/ui

Single is a shadcn/ui theme built around a neutral gray primary color (#8a8b8f) with neutral gray accents (#8f8e8a). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#8a8b8f) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#ffffffwhite
#030407black
Foreground
#02040eblack
#f6f7f9whitesmoke
Card
#ffffffwhite
#030407black
Card foreground
#02040eblack
#f6f7f9whitesmoke
Popover
#ffffffwhite
#030407black
Popover foreground
#02040eblack
#f6f7f9whitesmoke
Primary
#8a8b8fgray
#8a8b8fgray
Primary foreground
#000000black
#000000black
Secondary
#8f8e8agray
#8f8e8agray
Secondary foreground
#000000black
#000000black
Muted
#f2f1eewhitesmoke
#11100dblack
Muted foreground
#706c5cdimgray
#a39f8fdarkgray
Accent
#8f8e8agray
#8f8e8agray
Accent foreground
#000000black
#000000black
Destructive
#650d01maroon
#fd4c35tomato
Destructive foreground
#fea69alightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8a8b8fgray
#8a8b8fgray

Contrast

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

Light mode
Text on background20.46:1AAA
Text on card20.46:1AAA
Primary button6.16:1AA
Secondary button6.36:1AA
Muted text4.64:1AA
Accent6.36:1AA
Destructive6.91:1AA
Dark mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button6.16:1AA
Secondary button6.36:1AA
Muted text7.15:1AAA
Accent6.36:1AA
Destructive3.34:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.111 0.027 262.718);
  --muted: oklch(0.957 0.004 93.909);
  --muted-foreground: oklch(0.53 0.025 94.297);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.111 0.027 262.718);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.111 0.027 262.718);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.637 0.005 273.768);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.645 0.005 93.955);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.645 0.005 93.955);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.327 0.123 31.871);
  --destructive-foreground: oklch(0.809 0.107 27.859);
  --ring: oklch(0.637 0.005 273.768);
  --chart-1: oklch(0.637 0.005 273.768);
  --chart-2: oklch(0.645 0.005 93.955);
  --chart-3: oklch(0.645 0.005 93.955);
  --chart-4: oklch(0.67 0.005 93.945);
  --chart-5: oklch(0.631 0.014 273.609);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.009 270.157);
  --foreground: oklch(0.975 0.003 273.835);
  --muted: oklch(0.174 0.006 94.198);
  --muted-foreground: oklch(0.701 0.023 94.191);
  --popover: oklch(0.108 0.009 270.157);
  --popover-foreground: oklch(0.975 0.003 273.835);
  --card: oklch(0.108 0.009 270.157);
  --card-foreground: oklch(0.975 0.003 273.835);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.637 0.005 273.768);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.645 0.005 93.955);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.645 0.005 93.955);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.666 0.217 30.85);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.637 0.005 273.768);
  --chart-1: oklch(0.637 0.005 273.768);
  --chart-2: oklch(0.645 0.005 93.955);
  --chart-3: oklch(0.645 0.005 93.955);
  --chart-4: oklch(0.67 0.005 93.945);
  --chart-5: oklch(0.631 0.014 273.609);
}