Spherical is a shadcn/ui theme built around a vivid deep violet primary color (#38034f) with vivid deep green accents (#1a4f03). The light mode uses a neutral background (#fbf7fc). Dark mode keeps the vivid deep violet primary (#38034f) on a neutral background (#030203).
| Token | Light | Dark |
|---|---|---|
| Background | #fbf7fcghostwhite | #030203black |
| Foreground | #09040cblack | #fdfcfdwhite |
| Card | #f9f4fbghostwhite | #060307black |
| Card foreground | #060208black | #ffffffwhite |
| Popover | #f9f4fbghostwhite | #060307black |
| Popover foreground | #060208black | #ffffffwhite |
| Primary | #38034fmidnightblue | #38034fmidnightblue |
| Primary foreground | #d989fbviolet | #d989fbviolet |
| Secondary | #1a4f03darkgreen | #1a4f03darkgreen |
| Secondary foreground | #65f726lawngreen | #65f726lawngreen |
| Muted | #f1f6efwhitesmoke | #0b1009black |
| Muted foreground | #4b5148darkslategray | #b1b7aedarkgray |
| Accent | #1a4f03darkgreen | #1a4f03darkgreen |
| Accent foreground | #65f726lawngreen | #65f726lawngreen |
| Destructive | #940c05darkred | #f72c22orangered |
| Destructive foreground | #fdd0cepink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #38034fmidnightblue | #38034fmidnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.20:1 | AAA |
| Text on card | 18.93:1 | AAA |
| Primary button | 6.90:1 | AA |
| Secondary button | 6.90:1 | AA |
| Muted text | 7.45:1 | AAA |
| Accent | 6.90:1 | AA |
| Destructive | 6.53:1 | AA |
| Text on background | 20.26:1 | AAA |
| Text on card | 20.47:1 | AAA |
| Primary button | 6.90:1 | AA |
| Secondary button | 6.90:1 | AA |
| Muted text | 9.36:1 | AAA |
| Accent | 6.90:1 | AA |
| Destructive | 3.93:1 | AA Large |
Paste this into your globals.css to use Spherical in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.008 315.994);
--foreground: oklch(0.121 0.026 317.622);
--muted: oklch(0.967 0.011 136.064);
--muted-foreground: oklch(0.426 0.017 136.171);
--popover: oklch(0.972 0.011 315.98);
--popover-foreground: oklch(0.105 0.022 317.876);
--card: oklch(0.972 0.011 315.98);
--card-foreground: oklch(0.105 0.022 317.876);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.262 0.126 312.016);
--primary-foreground: oklch(0.754 0.176 315.059);
--secondary: oklch(0.376 0.116 138.95);
--secondary-foreground: oklch(0.862 0.261 138.981);
--accent: oklch(0.376 0.116 138.95);
--accent-foreground: oklch(0.862 0.261 138.981);
--destructive: oklch(0.423 0.166 29.556);
--destructive-foreground: oklch(0.896 0.051 21.685);
--ring: oklch(0.262 0.126 312.016);
--chart-1: oklch(0.262 0.126 312.016);
--chart-2: oklch(0.376 0.116 138.95);
--chart-3: oklch(0.376 0.116 138.95);
--chart-4: oklch(0.423 0.131 139.197);
--chart-5: oklch(0.262 0.129 311.841);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.087 0.01 317.075);
--foreground: oklch(0.992 0.002 316.015);
--muted: oklch(0.167 0.017 136.366);
--muted-foreground: oklch(0.772 0.015 136.091);
--popover: oklch(0.11 0.013 317.075);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.11 0.013 317.075);
--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.262 0.126 312.016);
--primary-foreground: oklch(0.754 0.176 315.059);
--secondary: oklch(0.376 0.116 138.95);
--secondary-foreground: oklch(0.862 0.261 138.981);
--accent: oklch(0.376 0.116 138.95);
--accent-foreground: oklch(0.862 0.261 138.981);
--destructive: oklch(0.629 0.236 29.064);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.262 0.126 312.016);
--chart-1: oklch(0.262 0.126 312.016);
--chart-2: oklch(0.376 0.116 138.95);
--chart-3: oklch(0.376 0.116 138.95);
--chart-4: oklch(0.423 0.131 139.197);
--chart-5: oklch(0.262 0.129 311.841);
}