Spherical for shadcn/ui

Spherical is a shadcn/ui theme built around a green primary color (#46915b) with orange accents (#915b46). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the green primary (#46915b) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#010402black
Foreground
#020904black
#ffffffwhite
Card
#fcfdfcwhite
#010402black
Card foreground
#020904black
#ffffffwhite
Popover
#fcfdfcwhite
#010402black
Popover foreground
#020904black
#ffffffwhite
Primary
#46915bseagreen
#46915bseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5b4691darkslateblue
#5b4691darkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e0dceagainsboro
#191523black
Muted foreground
#4f4860darkslategray
#a69fb7darkgray
Accent
#915b46sienna
#915b46sienna
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#732c02saddlebrown
#fa6c19chocolate
Destructive foreground
#fdc9aanavajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#46915bseagreen
#46915bseagreen

Contrast

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

Light mode
Text on background19.76:1AAA
Text on card19.76:1AAA
Primary button3.86:1AA Large
Secondary button7.73:1AAA
Muted text6.40:1AA
Accent5.56:1AA
Destructive6.77:1AA
Dark mode
Text on background20.61:1AAA
Text on card20.61:1AAA
Primary button3.86:1AA Large
Secondary button7.73:1AAA
Muted text7.05:1AAA
Accent5.56:1AA
Destructive7.22:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 155.146);
  --foreground: oklch(0.124 0.023 154.55);
  --muted: oklch(0.901 0.02 298.92);
  --muted-foreground: oklch(0.419 0.039 297.658);
  --popover: oklch(0.993 0.002 155.146);
  --popover-foreground: oklch(0.124 0.023 154.55);
  --card: oklch(0.993 0.002 155.146);
  --card-foreground: oklch(0.124 0.023 154.55);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.593 0.111 150.93);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.452 0.119 294.184);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.525 0.078 42.26);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.39 0.111 44.145);
  --destructive-foreground: oklch(0.874 0.073 51.516);
  --ring: oklch(0.593 0.111 150.93);
  --chart-1: oklch(0.593 0.111 150.93);
  --chart-2: oklch(0.452 0.119 294.184);
  --chart-3: oklch(0.525 0.078 42.26);
  --chart-4: oklch(0.474 0.126 294.131);
  --chart-5: oklch(0.6 0.119 150.583);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.013 154.749);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.207 0.029 296.805);
  --muted-foreground: oklch(0.716 0.035 298.472);
  --popover: oklch(0.097 0.013 154.749);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.097 0.013 154.749);
  --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.593 0.111 150.93);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.452 0.119 294.184);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.525 0.078 42.26);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.697 0.193 44.355);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.593 0.111 150.93);
  --chart-1: oklch(0.593 0.111 150.93);
  --chart-2: oklch(0.452 0.119 294.184);
  --chart-3: oklch(0.525 0.078 42.26);
  --chart-4: oklch(0.474 0.126 294.131);
  --chart-5: oklch(0.6 0.119 150.583);
}