Lopsided for shadcn/ui

Lopsided is a shadcn/ui theme built around a neutral gray primary color (#6c6160) with neutral gray accents (#61606c). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#6c6160) on a neutral background (#040201).

Color palette

TokenLightDark
Background
#ffffffwhite
#040201black
Foreground
#000000black
#f9f6f6whitesmoke
Card
#fcfcfcsnow
#070303black
Card foreground
#000000black
#fbf9f9snow
Popover
#fcfcfcsnow
#070303black
Popover foreground
#000000black
#fbf9f9snow
Primary
#6c6160dimgray
#6c6160dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#606c61dimgray
#606c61dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e3ede4gainsboro
#121c13black
Muted foreground
#505e51darkslategray
#a1afa3darkgray
Accent
#61606cdimgray
#61606cdimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b41b04firebrick
#f52505orangered
Destructive foreground
#ffeeeblinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6c6160dimgray
#6c6160dimgray

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 button5.95:1AA
Secondary button5.49:1AA
Muted text5.71:1AA
Accent6.18:1AA
Destructive6.02:1AA
Dark mode
Text on background19.29:1AAA
Text on card19.51:1AAA
Primary button5.95:1AA
Secondary button5.49:1AA
Muted text7.65:1AAA
Accent6.18:1AA
Destructive4.08:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.936 0.015 148.94);
  --muted-foreground: oklch(0.465 0.026 148.452);
  --popover: oklch(0.992 0 161.565);
  --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.503 0.014 26.649);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.518 0.022 148.612);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.019 291.03);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.494 0.188 31.259);
  --destructive-foreground: oklch(0.961 0.019 28.042);
  --ring: oklch(0.503 0.014 26.649);
  --chart-1: oklch(0.503 0.014 26.649);
  --chart-2: oklch(0.518 0.022 148.612);
  --chart-3: oklch(0.494 0.019 291.03);
  --chart-4: oklch(0.545 0.024 148.607);
  --chart-5: oklch(0.5 0.021 26.782);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.009 30.051);
  --foreground: oklch(0.976 0.002 26.456);
  --muted: oklch(0.213 0.022 147.847);
  --muted-foreground: oklch(0.74 0.023 148.757);
  --popover: oklch(0.11 0.011 30.051);
  --popover-foreground: oklch(0.984 0.002 26.451);
  --card: oklch(0.11 0.011 30.051);
  --card-foreground: oklch(0.984 0.002 26.451);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.503 0.014 26.649);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.518 0.022 148.612);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.019 291.03);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.62 0.239 30.987);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.503 0.014 26.649);
  --chart-1: oklch(0.503 0.014 26.649);
  --chart-2: oklch(0.518 0.022 148.612);
  --chart-3: oklch(0.494 0.019 291.03);
  --chart-4: oklch(0.545 0.024 148.607);
  --chart-5: oklch(0.5 0.021 26.782);
}