Spherical for shadcn/ui

Spherical is a shadcn/ui theme built around a vivid light yellow primary color (#fffceb) with vivid light blue accents (#ebeeff). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light yellow primary (#fffceb) on a neutral background (#030302).

Color palette

TokenLightDark
Background
#ffffffwhite
#030302black
Foreground
#000000black
#fbfbf8snow
Card
#fcfcfcsnow
#070604black
Card foreground
#000000black
#fdfdfcwhite
Popover
#ffffffwhite
#030302black
Popover foreground
#000000black
#fbfbf8snow
Primary
#fffcebfloralwhite
#fffcebfloralwhite
Primary foreground
#504602darkolivegreen
#504602darkolivegreen
Secondary
#ebeefflavender
#ebeefflavender
Secondary foreground
#041bb4mediumblue
#041bb4mediumblue
Muted
#ced1e3lightgrey
#1c1f31darkslategray
Muted foreground
#373a48darkslategray
#b7b9c8silver
Accent
#ebeefflavender
#ebeefflavender
Accent foreground
#041bb4mediumblue
#041bb4mediumblue
Destructive
#c11c10firebrick
#e22012crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fffcebfloralwhite
#fffcebfloralwhite

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button9.17:1AAA
Secondary button9.97:1AAA
Muted text7.45:1AAA
Accent9.97:1AAA
Destructive6.09:1AA
Dark mode
Text on background19.88:1AAA
Text on card19.89:1AAA
Primary button9.17:1AAA
Secondary button9.97:1AAA
Muted text8.39:1AAA
Accent9.97:1AAA
Destructive4.70:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.865 0.025 278.893);
  --muted-foreground: oklch(0.351 0.025 278.157);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.988 0.022 99.665);
  --primary-foreground: oklch(0.391 0.08 99.355);
  --secondary: oklch(0.951 0.023 278.967);
  --secondary-foreground: oklch(0.368 0.228 264.658);
  --accent: oklch(0.951 0.023 278.967);
  --accent-foreground: oklch(0.368 0.228 264.658);
  --destructive: oklch(0.52 0.199 29.693);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.988 0.022 99.665);
  --chart-1: oklch(0.988 0.022 99.665);
  --chart-2: oklch(0.951 0.023 278.967);
  --chart-3: oklch(0.951 0.023 278.967);
  --chart-4: oklch(0.988 0.006 279.255);
  --chart-5: oklch(0.989 0.023 99.675);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.007 101.414);
  --foreground: oklch(0.988 0.004 99.395);
  --muted: oklch(0.244 0.034 276.822);
  --muted-foreground: oklch(0.789 0.02 278.94);
  --popover: oklch(0.097 0.007 101.414);
  --popover-foreground: oklch(0.988 0.004 99.395);
  --card: oklch(0.123 0.009 101.414);
  --card-foreground: oklch(0.994 0.002 99.368);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.988 0.022 99.665);
  --primary-foreground: oklch(0.391 0.08 99.355);
  --secondary: oklch(0.951 0.023 278.967);
  --secondary-foreground: oklch(0.368 0.228 264.658);
  --accent: oklch(0.951 0.023 278.967);
  --accent-foreground: oklch(0.368 0.228 264.658);
  --destructive: oklch(0.584 0.225 29.718);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.988 0.022 99.665);
  --chart-1: oklch(0.988 0.022 99.665);
  --chart-2: oklch(0.951 0.023 278.967);
  --chart-3: oklch(0.951 0.023 278.967);
  --chart-4: oklch(0.988 0.006 279.255);
  --chart-5: oklch(0.989 0.023 99.675);
}