Attitude for shadcn/ui

Attitude is a shadcn/ui theme built around a blue primary color (#385871) with green accents (#587138). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the blue primary (#385871) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfdfewhite
#000000black
Foreground
#020508black
#f6f7f8whitesmoke
Card
#f7fafdghostwhite
#030303black
Card foreground
#010304black
#f9fafbghostwhite
Popover
#f7fafdghostwhite
#030303black
Popover foreground
#010304black
#f9fafbghostwhite
Primary
#385871darkslategray
#385871darkslategray
Primary foreground
#e7eef3lavender
#e7eef3lavender
Secondary
#713858dimgray
#713858dimgray
Secondary foreground
#f3e7eelinen
#f3e7eelinen
Muted
#e6cbdbthistle
#341928darkslategray
Muted foreground
#686466dimgray
#9b9799darkgray
Accent
#587138darkolivegreen
#587138darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#a70a02darkred
#fd352borangered
Destructive foreground
#ffdddcmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#385871darkslategray
#385871darkslategray

Contrast

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

Light mode
Text on background19.98:1AAA
Text on card19.76:1AAA
Primary button6.40:1AA
Secondary button7.29:1AAA
Muted text3.87:1AA Large
Accent5.49:1AA
Destructive6.20:1AA
Dark mode
Text on background19.57:1AAA
Text on card19.78:1AAA
Primary button6.40:1AA
Secondary button7.29:1AAA
Muted text5.54:1AA
Accent5.49:1AA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 240.32);
  --foreground: oklch(0.114 0.012 232.907);
  --muted: oklch(0.87 0.036 342.77);
  --muted-foreground: oklch(0.508 0.006 342.1);
  --popover: oklch(0.984 0.005 240.357);
  --popover-foreground: oklch(0.09 0.01 232.907);
  --card: oklch(0.984 0.005 240.357);
  --card-foreground: oklch(0.09 0.01 232.907);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.446 0.056 242.473);
  --primary-foreground: oklch(0.945 0.01 240.433);
  --secondary: oklch(0.424 0.091 346.588);
  --secondary-foreground: oklch(0.94 0.016 342.209);
  --accent: oklch(0.514 0.088 128.413);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.46 0.184 29.781);
  --destructive-foreground: oklch(0.926 0.037 21.43);
  --ring: oklch(0.446 0.056 242.473);
  --chart-1: oklch(0.446 0.056 242.473);
  --chart-2: oklch(0.424 0.091 346.588);
  --chart-3: oklch(0.514 0.088 128.413);
  --chart-4: oklch(0.45 0.098 346.645);
  --chart-5: oklch(0.447 0.06 242.732);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.977 0.002 240.305);
  --muted: oklch(0.256 0.049 346.011);
  --muted-foreground: oklch(0.68 0.006 342.011);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.985 0.001 240.298);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.985 0.001 240.298);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.446 0.056 242.473);
  --primary-foreground: oklch(0.945 0.01 240.433);
  --secondary: oklch(0.424 0.091 346.588);
  --secondary-foreground: oklch(0.94 0.016 342.209);
  --accent: oklch(0.514 0.088 128.413);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.646 0.234 28.757);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.446 0.056 242.473);
  --chart-1: oklch(0.446 0.056 242.473);
  --chart-2: oklch(0.424 0.091 346.588);
  --chart-3: oklch(0.514 0.088 128.413);
  --chart-4: oklch(0.45 0.098 346.645);
  --chart-5: oklch(0.447 0.06 242.732);
}