Peasant for shadcn/ui

Peasant is a shadcn/ui theme built around a light indigo primary color (#d5d0f6) with light green accents (#f0f6d0). The light mode uses a neutral background (#ffffff). Dark mode keeps the light indigo primary (#d5d0f6) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#f6f6f9whitesmoke
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#f9f9fbghostwhite
Popover
#fcfcfcsnow
#030303black
Popover foreground
#000000black
#f9f9fbghostwhite
Primary
#d5d0f6lavender
#d5d0f6lavender
Primary foreground
#26177dmidnightblue
#26177dmidnightblue
Secondary
#f0f6d0lightgoldenrodyellow
#f0f6d0lightgoldenrodyellow
Secondary foreground
#222707black
#222707black
Muted
#ecece9linen
#161613black
Muted foreground
#606156dimgray
#a7a99edarkgray
Accent
#f0f6d0lightgoldenrodyellow
#f0f6d0lightgoldenrodyellow
Accent foreground
#222707black
#222707black
Destructive
#9d1801darkred
#fe4120orangered
Destructive foreground
#ffd8d1bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d5d0f6lavender
#d5d0f6lavender

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 button9.43:1AAA
Secondary button13.84:1AAA
Muted text5.31:1AA
Accent13.84:1AAA
Destructive6.21:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.66:1AAA
Primary button9.43:1AAA
Secondary button13.84:1AAA
Muted text7.61:1AAA
Accent13.84:1AAA
Destructive3.50:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.942 0.004 113.393);
  --muted-foreground: oklch(0.489 0.017 113.963);
  --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.873 0.053 292.137);
  --primary-foreground: oklch(0.31 0.159 278.488);
  --secondary: oklch(0.96 0.051 114.291);
  --secondary-foreground: oklch(0.259 0.05 117.265);
  --accent: oklch(0.96 0.051 114.291);
  --accent-foreground: oklch(0.259 0.05 117.265);
  --destructive: oklch(0.448 0.17 31.898);
  --destructive-foreground: oklch(0.913 0.044 29.717);
  --ring: oklch(0.873 0.053 292.137);
  --chart-1: oklch(0.873 0.053 292.137);
  --chart-2: oklch(0.96 0.051 114.291);
  --chart-3: oklch(0.96 0.051 114.291);
  --chart-4: oklch(0.971 0.037 114.017);
  --chart-5: oklch(0.871 0.056 292.081);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.974 0.004 293.223);
  --muted: oklch(0.198 0.006 113.907);
  --muted-foreground: oklch(0.729 0.016 113.707);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.982 0.003 293.252);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.982 0.003 293.252);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.873 0.053 292.137);
  --primary-foreground: oklch(0.31 0.159 278.488);
  --secondary: oklch(0.96 0.051 114.291);
  --secondary-foreground: oklch(0.259 0.05 117.265);
  --accent: oklch(0.96 0.051 114.291);
  --accent-foreground: oklch(0.259 0.05 117.265);
  --destructive: oklch(0.656 0.229 32.233);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.873 0.053 292.137);
  --chart-1: oklch(0.873 0.053 292.137);
  --chart-2: oklch(0.96 0.051 114.291);
  --chart-3: oklch(0.96 0.051 114.291);
  --chart-4: oklch(0.971 0.037 114.017);
  --chart-5: oklch(0.871 0.056 292.081);
}