Lopsided for shadcn/ui

Lopsided is a shadcn/ui theme built around a light green primary color (#e3f2d9) with muted light green accents (#dde6d6). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#e3f2d9) on a green-tinted background (#091005).

Color palette

TokenLightDark
Background
#ffffffwhite
#091005black
Foreground
#0c1406black
#fafcf8snow
Card
#fcfcfcsnow
#0c1406black
Card foreground
#091005black
#fcfdfcwhite
Popover
#ffffffwhite
#091005black
Popover foreground
#0c1406black
#fafcf8snow
Primary
#e3f2d9beige
#e3f2d9beige
Primary foreground
#17260dblack
#17260dblack
Secondary
#eaeee8linen
#21231fblack
Secondary foreground
#1e231ablack
#babeb7silver
Muted
#e0e3degainsboro
#1e211cblack
Muted foreground
#656a62dimgray
#989d95darkgray
Accent
#dde6d6gainsboro
#2f372adarkslategray
Accent foreground
#425534darkolivegreen
#c8d0c2silver
Destructive
#9e1210darkred
#e91f1ccrimson
Destructive foreground
#fce4e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e3f2d9beige
#e3f2d9beige

Contrast

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

Light mode
Text on background18.77:1AAA
Text on card18.88:1AAA
Primary button13.60:1AAA
Secondary button13.62:1AAA
Muted text4.27:1AA Large
Accent6.32:1AA
Destructive6.82:1AA
Dark mode
Text on background18.72:1AAA
Text on card18.46:1AAA
Primary button13.60:1AAA
Secondary button8.41:1AAA
Muted text5.88:1AA
Accent7.80:1AAA
Destructive4.50:1AA

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.177 0.03 132.599);
  --muted: oklch(0.912 0.007 131.789);
  --muted-foreground: oklch(0.518 0.014 131.945);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.177 0.03 132.599);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.161 0.026 131.511);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.943 0.036 132.039);
  --primary-foreground: oklch(0.247 0.047 133.705);
  --secondary: oklch(0.944 0.009 131.802);
  --secondary-foreground: oklch(0.248 0.019 132.366);
  --accent: oklch(0.913 0.023 131.936);
  --accent-foreground: oklch(0.425 0.057 132.973);
  --destructive: oklch(0.446 0.172 28.428);
  --destructive-foreground: oklch(0.937 0.027 18.817);
  --ring: oklch(0.943 0.036 132.039);
  --chart-1: oklch(0.943 0.036 132.039);
  --chart-2: oklch(0.944 0.009 131.802);
  --chart-3: oklch(0.913 0.023 131.936);
  --chart-4: oklch(0.965 0.006 131.772);
  --chart-5: oklch(0.944 0.038 132.059);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.161 0.026 131.511);
  --foreground: oklch(0.987 0.005 131.766);
  --muted: oklch(0.243 0.01 132.068);
  --muted-foreground: oklch(0.69 0.013 131.878);
  --popover: oklch(0.161 0.026 131.511);
  --popover-foreground: oklch(0.987 0.005 131.766);
  --card: oklch(0.177 0.03 132.599);
  --card-foreground: oklch(0.994 0.003 131.745);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.943 0.036 132.039);
  --primary-foreground: oklch(0.247 0.047 133.705);
  --secondary: oklch(0.252 0.007 131.945);
  --secondary-foreground: oklch(0.795 0.011 131.833);
  --accent: oklch(0.325 0.024 132.353);
  --accent-foreground: oklch(0.849 0.021 131.927);
  --destructive: oklch(0.596 0.23 28.472);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.943 0.036 132.039);
  --chart-1: oklch(0.943 0.036 132.039);
  --chart-2: oklch(0.252 0.007 131.945);
  --chart-3: oklch(0.325 0.024 132.353);
  --chart-4: oklch(0.285 0.008 131.958);
  --chart-5: oklch(0.944 0.038 132.059);
}