Lopsided for shadcn/ui

Lopsided is a shadcn/ui theme built around a deep yellow primary color (#575629) with neutral gray accents (#d9d9d8). The light mode uses a neutral background (#fdfdf7). Dark mode keeps the deep yellow primary (#575629) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#fdfdf7snow
#070703black
Foreground
#0f0f05black
#fdfdfcwhite
Card
#fdfdf7snow
#070703black
Card foreground
#0f0f05black
#fdfdfcwhite
Popover
#fdfdf7snow
#070703black
Popover foreground
#0f0f05black
#fdfdfcwhite
Primary
#575629darkolivegreen
#575629darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d9d9d8gainsboro
#151514black
Secondary foreground
#40403fdarkslategray
#b0b0abdarkgray
Muted
#f4f4e6linen
#19190bblack
Muted foreground
#54544fdarkslategray
#b0b0abdarkgray
Accent
#d9d9d8gainsboro
#151514black
Accent foreground
#40403fdarkslategray
#b0b0abdarkgray
Destructive
#e31902red
#fd3721orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#575629darkolivegreen
#575629darkolivegreen

Contrast

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

Light mode
Text on background18.83:1AAA
Text on card18.83:1AAA
Primary button7.60:1AAA
Secondary button7.35:1AAA
Muted text6.86:1AA
Accent7.35:1AAA
Destructive4.76:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.82:1AAA
Primary button7.60:1AAA
Secondary button8.39:1AAA
Muted text8.16:1AAA
Accent8.39:1AAA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.008 105.756);
  --foreground: oklch(0.166 0.021 107.712);
  --muted: oklch(0.963 0.018 105.946);
  --muted-foreground: oklch(0.444 0.008 105.922);
  --popover: oklch(0.992 0.008 105.756);
  --popover-foreground: oklch(0.166 0.021 107.712);
  --card: oklch(0.992 0.008 105.756);
  --card-foreground: oklch(0.166 0.021 107.712);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.443 0.065 107.919);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.885 0.001 105.637);
  --secondary-foreground: oklch(0.372 0.002 105.717);
  --accent: oklch(0.885 0.001 105.637);
  --accent-foreground: oklch(0.372 0.002 105.717);
  --destructive: oklch(0.582 0.23 30.327);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.443 0.065 107.919);
  --chart-1: oklch(0.443 0.065 107.919);
  --chart-2: oklch(0.885 0.001 105.637);
  --chart-3: oklch(0.885 0.001 105.637);
  --chart-4: oklch(0.909 0.001 105.633);
  --chart-5: oklch(0.449 0.069 108.017);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.012 107.359);
  --foreground: oklch(0.995 0.002 105.659);
  --muted: oklch(0.207 0.025 107.54);
  --muted-foreground: oklch(0.755 0.007 105.776);
  --popover: oklch(0.126 0.012 107.359);
  --popover-foreground: oklch(0.995 0.002 105.659);
  --card: oklch(0.126 0.012 107.359);
  --card-foreground: oklch(0.995 0.002 105.659);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.443 0.065 107.919);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.195 0.002 105.832);
  --secondary-foreground: oklch(0.755 0.007 105.776);
  --accent: oklch(0.195 0.002 105.832);
  --accent-foreground: oklch(0.755 0.007 105.776);
  --destructive: oklch(0.646 0.235 30.499);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.443 0.065 107.919);
  --chart-1: oklch(0.443 0.065 107.919);
  --chart-2: oklch(0.195 0.002 105.832);
  --chart-3: oklch(0.195 0.002 105.832);
  --chart-4: oklch(0.23 0.003 105.858);
  --chart-5: oklch(0.449 0.069 108.017);
}