Spherical for shadcn/ui

Spherical is a shadcn/ui theme built around a deep blue primary color (#111a22) with muted blue accents (#adbecc). The light mode uses a neutral background (#f8fafc). Dark mode keeps the deep blue primary (#111a22) on a neutral background (#030507).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#030507black
Foreground
#010304black
#f5f7f9whitesmoke
Card
#f8fafcghostwhite
#030507black
Card foreground
#010304black
#f5f7f9whitesmoke
Popover
#f8fafcghostwhite
#030507black
Popover foreground
#010304black
#f5f7f9whitesmoke
Primary
#111a22black
#111a22black
Primary foreground
#99b4cclightsteelblue
#99b4cclightsteelblue
Secondary
#c6cfd7lightgrey
#303030darkslategray
Secondary foreground
#2c363fdarkslategray
#c9c9c9silver
Muted
#e2e8eelavender
#1d1111black
Muted foreground
#464a4edarkslategray
#b9b1b1darkgray
Accent
#adbecclightsteelblue
#4e4141darkslategray
Accent foreground
#1b242cdarkslategray
#e3dedegainsboro
Destructive
#750f06maroon
#e01c0bred
Destructive foreground
#fbb7b1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#111a22black
#111a22black

Contrast

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

Light mode
Text on background19.75:1AAA
Text on card19.75:1AAA
Primary button8.16:1AAA
Secondary button7.80:1AAA
Muted text7.25:1AAA
Accent8.23:1AAA
Destructive6.85:1AA
Dark mode
Text on background18.99:1AAA
Text on card18.99:1AAA
Primary button8.16:1AAA
Secondary button7.91:1AAA
Muted text8.77:1AAA
Accent7.32:1AAA
Destructive4.83:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.003 244.133);
  --foreground: oklch(0.089 0.011 235.326);
  --muted: oklch(0.929 0.011 244.236);
  --muted-foreground: oklch(0.407 0.009 244.373);
  --popover: oklch(0.984 0.003 244.133);
  --popover-foreground: oklch(0.089 0.011 235.326);
  --card: oklch(0.984 0.003 244.133);
  --card-foreground: oklch(0.089 0.011 235.326);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.213 0.02 245.37);
  --primary-foreground: oklch(0.758 0.045 244.841);
  --secondary: oklch(0.85 0.014 244.299);
  --secondary-foreground: oklch(0.328 0.02 244.862);
  --accent: oklch(0.793 0.027 244.513);
  --accent-foreground: oklch(0.256 0.019 245.052);
  --destructive: oklch(0.362 0.136 30.247);
  --destructive-foreground: oklch(0.842 0.08 24.765);
  --ring: oklch(0.213 0.02 245.37);
  --chart-1: oklch(0.213 0.02 245.37);
  --chart-2: oklch(0.85 0.014 244.299);
  --chart-3: oklch(0.793 0.027 244.513);
  --chart-4: oklch(0.874 0.012 244.26);
  --chart-5: oklch(0.213 0.022 245.508);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.114 0.009 238.156);
  --foreground: oklch(0.976 0.003 244.134);
  --muted: oklch(0.193 0.022 19.243);
  --muted-foreground: oklch(0.767 0.01 17.378);
  --popover: oklch(0.114 0.009 238.156);
  --popover-foreground: oklch(0.976 0.003 244.134);
  --card: oklch(0.114 0.009 238.156);
  --card-foreground: oklch(0.976 0.003 244.134);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.213 0.02 245.37);
  --primary-foreground: oklch(0.758 0.045 244.841);
  --secondary: oklch(0.311 0 180);
  --secondary-foreground: oklch(0.837 0 171.254);
  --accent: oklch(0.389 0.018 17.944);
  --accent-foreground: oklch(0.904 0.006 17.268);
  --destructive: oklch(0.578 0.226 30.064);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.213 0.02 245.37);
  --chart-1: oklch(0.213 0.02 245.37);
  --chart-2: oklch(0.311 0 180);
  --chart-3: oklch(0.389 0.018 17.944);
  --chart-4: oklch(0.341 0 158.199);
  --chart-5: oklch(0.213 0.022 245.508);
}