Cowboy for shadcn/ui

Cowboy is a shadcn/ui theme built around a light yellow primary color (#f2eba1) with light indigo accents (#a1a8f2). The light mode uses a neutral background (#fefefb). Dark mode keeps the light yellow primary (#f2eba1) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#fefefbwhite
#070703black
Foreground
#0c0b03black
#fdfdfcwhite
Card
#fdfdf7snow
#0b0b04black
Card foreground
#080802black
#ffffffwhite
Popover
#fdfdf7snow
#0b0b04black
Popover foreground
#080802black
#ffffffwhite
Primary
#f2eba1palegoldenrod
#f2eba1palegoldenrod
Primary foreground
#554f0cdarkolivegreen
#554f0cdarkolivegreen
Secondary
#a1a8f2lightsteelblue
#a1a8f2lightsteelblue
Secondary foreground
#0c1255midnightblue
#0c1255midnightblue
Muted
#d0d2e7gainsboro
#181a2fblack
Muted foreground
#3e3e42darkslategray
#bdbec1silver
Accent
#a1a8f2lightsteelblue
#a1a8f2lightsteelblue
Accent foreground
#0c1255midnightblue
#0c1255midnightblue
Destructive
#cc1c05firebrick
#f9391forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f2eba1palegoldenrod
#f2eba1palegoldenrod

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.60:1AAA
Primary button6.83:1AA
Secondary button7.62:1AAA
Muted text7.11:1AAA
Accent7.62:1AAA
Destructive5.62:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.77:1AAA
Primary button6.83:1AA
Secondary button7.62:1AAA
Muted text9.18:1AAA
Accent7.62:1AAA
Destructive3.72:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 102.275);
  --foreground: oklch(0.149 0.021 105.045);
  --muted: oklch(0.868 0.029 281.642);
  --muted-foreground: oklch(0.365 0.006 281.937);
  --popover: oklch(0.991 0.008 102.338);
  --popover-foreground: oklch(0.13 0.018 105.368);
  --card: oklch(0.991 0.008 102.338);
  --card-foreground: oklch(0.13 0.018 105.368);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.928 0.093 103.632);
  --primary-foreground: oklch(0.42 0.083 103.9);
  --secondary: oklch(0.754 0.106 279.532);
  --secondary-foreground: oklch(0.237 0.118 269.711);
  --accent: oklch(0.754 0.106 279.532);
  --accent-foreground: oklch(0.237 0.118 269.711);
  --destructive: oklch(0.54 0.209 30.755);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.928 0.093 103.632);
  --chart-1: oklch(0.928 0.093 103.632);
  --chart-2: oklch(0.754 0.106 279.532);
  --chart-3: oklch(0.754 0.106 279.532);
  --chart-4: oklch(0.789 0.09 280.096);
  --chart-5: oklch(0.932 0.097 103.667);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.014 104.721);
  --foreground: oklch(0.994 0.002 102.237);
  --muted: oklch(0.228 0.041 278.7);
  --muted-foreground: oklch(0.801 0.005 282.11);
  --popover: oklch(0.145 0.016 104.566);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.145 0.016 104.566);
  --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.928 0.093 103.632);
  --primary-foreground: oklch(0.42 0.083 103.9);
  --secondary: oklch(0.754 0.106 279.532);
  --secondary-foreground: oklch(0.237 0.118 269.711);
  --accent: oklch(0.754 0.106 279.532);
  --accent-foreground: oklch(0.237 0.118 269.711);
  --destructive: oklch(0.641 0.23 31.039);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.928 0.093 103.632);
  --chart-1: oklch(0.928 0.093 103.632);
  --chart-2: oklch(0.754 0.106 279.532);
  --chart-3: oklch(0.754 0.106 279.532);
  --chart-4: oklch(0.789 0.09 280.096);
  --chart-5: oklch(0.932 0.097 103.667);
}