Basketball for shadcn/ui

Basketball is a shadcn/ui theme built around a neutral gray primary color (#afafb1) with neutral gray accents (#b1b1af). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the neutral gray primary (#afafb1) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#000000black
Foreground
#000000black
#ffffffwhite
Card
#f8f8fcghostwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#f8f8fcghostwhite
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#afafb1darkgray
#afafb1darkgray
Primary foreground
#171717black
#171717black
Secondary
#b1b1afdarkgray
#b1b1afdarkgray
Secondary foreground
#171717black
#171717black
Muted
#f1f0e5linen
#1a1a0eblack
Muted foreground
#5e5d55dimgray
#aaaaa1darkgray
Accent
#b1b1afdarkgray
#b1b1afdarkgray
Accent foreground
#171717black
#171717black
Destructive
#5f0a07maroon
#f0433dtomato
Destructive foreground
#f8a3a0lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#afafb1darkgray
#afafb1darkgray

Contrast

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

Light mode
Text on background20.43:1AAA
Text on card19.88:1AAA
Primary button8.20:1AAA
Secondary button8.32:1AAA
Muted text5.76:1AA
Accent8.32:1AAA
Destructive7.00:1AAA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button8.20:1AAA
Secondary button8.32:1AAA
Muted text7.49:1AAA
Accent8.32:1AAA
Destructive3.76:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 283.936);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.952 0.015 104.237);
  --muted-foreground: oklch(0.477 0.013 104.439);
  --popover: oklch(0.981 0.004 283.899);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.004 283.899);
  --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.755 0.002 283.923);
  --primary-foreground: oklch(0.204 0.001 283.898);
  --secondary: oklch(0.759 0.002 104.019);
  --secondary-foreground: oklch(0.205 0.001 104.043);
  --accent: oklch(0.759 0.002 104.019);
  --accent-foreground: oklch(0.205 0.001 104.043);
  --destructive: oklch(0.313 0.117 28.637);
  --destructive-foreground: oklch(0.799 0.101 21.74);
  --ring: oklch(0.755 0.002 283.923);
  --chart-1: oklch(0.755 0.002 283.923);
  --chart-2: oklch(0.759 0.002 104.019);
  --chart-3: oklch(0.759 0.002 104.019);
  --chart-4: oklch(0.783 0.002 104.013);
  --chart-5: oklch(0.75 0.009 283.773);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.214 0.021 105.466);
  --muted-foreground: oklch(0.735 0.012 104.248);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.755 0.002 283.923);
  --primary-foreground: oklch(0.204 0.001 283.898);
  --secondary: oklch(0.759 0.002 104.019);
  --secondary-foreground: oklch(0.205 0.001 104.043);
  --accent: oklch(0.759 0.002 104.019);
  --accent-foreground: oklch(0.205 0.001 104.043);
  --destructive: oklch(0.637 0.211 27.102);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.755 0.002 283.923);
  --chart-1: oklch(0.755 0.002 283.923);
  --chart-2: oklch(0.759 0.002 104.019);
  --chart-3: oklch(0.759 0.002 104.019);
  --chart-4: oklch(0.783 0.002 104.013);
  --chart-5: oklch(0.75 0.009 283.773);
}