Upbeat for shadcn/ui

Upbeat is a shadcn/ui theme built around a deep green primary color (#172e0a) with deep pink accents (#2e0a17). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#172e0a) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#ffffffwhite
#020401black
Foreground
#081202black
#f7f9f6whitesmoke
Card
#fcfcfcsnow
#040703black
Card foreground
#060d02black
#fafbf9snow
Popover
#ffffffwhite
#020401black
Popover foreground
#081202black
#f7f9f6whitesmoke
Primary
#172e0ablack
#172e0ablack
Primary foreground
#6dd133yellowgreen
#6dd133yellowgreen
Secondary
#0a172eblack
#0a172eblack
Secondary foreground
#86a9e4skyblue
#86a9e4skyblue
Muted
#e5e9f0lavender
#0f131ablack
Muted foreground
#3d4552darkslategray
#adb5c2silver
Accent
#2e0a17black
#2e0a17black
Accent foreground
#e486a9palevioletred
#e486a9palevioletred
Destructive
#c7280ffirebrick
#ed2f12orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#172e0ablack
#172e0ablack

Contrast

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

Light mode
Text on background19.13:1AAA
Text on card19.27:1AAA
Primary button7.57:1AAA
Secondary button7.48:1AAA
Muted text7.95:1AAA
Accent7.06:1AAA
Destructive5.61:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.46:1AAA
Primary button7.57:1AAA
Secondary button7.48:1AAA
Muted text9.01:1AAA
Accent7.06:1AAA
Destructive4.18:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.167 0.037 132.898);
  --muted: oklch(0.934 0.01 261.509);
  --muted-foreground: oklch(0.387 0.025 261.369);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.167 0.037 132.898);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.148 0.032 131.944);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.272 0.065 135.898);
  --primary-foreground: oklch(0.77 0.21 136.745);
  --secondary: oklch(0.208 0.048 260.621);
  --secondary-foreground: oklch(0.731 0.094 261.079);
  --accent: oklch(0.213 0.06 0.874);
  --accent-foreground: oklch(0.73 0.12 357.046);
  --destructive: oklch(0.539 0.198 31.467);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.272 0.065 135.898);
  --chart-1: oklch(0.272 0.065 135.898);
  --chart-2: oklch(0.208 0.048 260.621);
  --chart-3: oklch(0.213 0.06 0.874);
  --chart-4: oklch(0.237 0.059 260.571);
  --chart-5: oklch(0.274 0.067 136.026);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.013 132.34);
  --foreground: oklch(0.979 0.004 133.629);
  --muted: oklch(0.186 0.015 261.305);
  --muted-foreground: oklch(0.77 0.021 261.484);
  --popover: oklch(0.098 0.013 132.34);
  --popover-foreground: oklch(0.979 0.004 133.629);
  --card: oklch(0.124 0.017 132.34);
  --card-foreground: oklch(0.986 0.002 133.621);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.272 0.065 135.898);
  --primary-foreground: oklch(0.77 0.21 136.745);
  --secondary: oklch(0.208 0.048 260.621);
  --secondary-foreground: oklch(0.731 0.094 261.079);
  --accent: oklch(0.213 0.06 0.874);
  --accent-foreground: oklch(0.73 0.12 357.046);
  --destructive: oklch(0.613 0.227 31.411);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.272 0.065 135.898);
  --chart-1: oklch(0.272 0.065 135.898);
  --chart-2: oklch(0.208 0.048 260.621);
  --chart-3: oklch(0.213 0.06 0.874);
  --chart-4: oklch(0.237 0.059 260.571);
  --chart-5: oklch(0.274 0.067 136.026);
}