Upper for shadcn/ui

Upper is a shadcn/ui theme built around a vivid deep blue primary color (#052261) with vivid deep yellow accents (#614405). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep blue primary (#052261) on a neutral background (#010204).

Color palette

TokenLightDark
Background
#ffffffwhite
#010204black
Foreground
#030917black
#f9fafbghostwhite
Card
#fcfcfcsnow
#020408black
Card foreground
#020712black
#fcfcfdwhite
Popover
#ffffffwhite
#010204black
Popover foreground
#030917black
#f9fafbghostwhite
Primary
#052261midnightblue
#052261midnightblue
Primary foreground
#9ebbfalightskyblue
#9ebbfalightskyblue
Secondary
#614405saddlebrown
#614405saddlebrown
Secondary foreground
#fadd9enavajowhite
#fadd9enavajowhite
Muted
#eae1cdgainsboro
#322915black
Muted foreground
#5f5c53dimgray
#aca8a0darkgray
Accent
#614405saddlebrown
#614405saddlebrown
Accent foreground
#fadd9enavajowhite
#fadd9enavajowhite
Destructive
#cb4401chocolate
#fe6010orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#052261midnightblue
#052261midnightblue

Contrast

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

Light mode
Text on background19.89:1AAA
Text on card19.72:1AAA
Primary button7.76:1AAA
Secondary button6.81:1AA
Muted text5.11:1AA
Accent6.81:1AA
Destructive4.80:1AA
Dark mode
Text on background19.86:1AAA
Text on card20.01:1AAA
Primary button7.76:1AAA
Secondary button6.81:1AA
Muted text6.05:1AA
Accent6.81:1AA
Destructive6.87:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.141 0.033 258.564);
  --muted: oklch(0.91 0.028 86.09);
  --muted-foreground: oklch(0.474 0.014 86.09);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.141 0.033 258.564);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.13 0.028 256.629);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.28 0.117 262.472);
  --primary-foreground: oklch(0.794 0.095 265.091);
  --secondary: oklch(0.408 0.082 79.75);
  --secondary-foreground: oklch(0.907 0.086 85.832);
  --accent: oklch(0.408 0.082 79.75);
  --accent-foreground: oklch(0.907 0.086 85.832);
  --destructive: oklch(0.572 0.181 39.476);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.28 0.117 262.472);
  --chart-1: oklch(0.28 0.117 262.472);
  --chart-2: oklch(0.408 0.082 79.75);
  --chart-3: oklch(0.408 0.082 79.75);
  --chart-4: oklch(0.449 0.091 79.273);
  --chart-5: oklch(0.28 0.12 262.309);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.012 257.422);
  --foreground: oklch(0.984 0.002 265.999);
  --muted: oklch(0.285 0.035 85.413);
  --muted-foreground: oklch(0.733 0.013 86.066);
  --popover: oklch(0.084 0.012 257.422);
  --popover-foreground: oklch(0.984 0.002 265.999);
  --card: oklch(0.106 0.015 257.422);
  --card-foreground: oklch(0.992 0.001 266.003);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.28 0.117 262.472);
  --primary-foreground: oklch(0.794 0.095 265.091);
  --secondary: oklch(0.408 0.082 79.75);
  --secondary-foreground: oklch(0.907 0.086 85.832);
  --accent: oklch(0.408 0.082 79.75);
  --accent-foreground: oklch(0.907 0.086 85.832);
  --destructive: oklch(0.686 0.207 40.789);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.28 0.117 262.472);
  --chart-1: oklch(0.28 0.117 262.472);
  --chart-2: oklch(0.408 0.082 79.75);
  --chart-3: oklch(0.408 0.082 79.75);
  --chart-4: oklch(0.449 0.091 79.273);
  --chart-5: oklch(0.28 0.12 262.309);
}