theme porfolio for shadcn/ui

theme porfolio is a shadcn/ui theme built around a blue primary color (#1a3584) with near-white accents (#e6e7ea). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the blue primary (#1a3584) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#030407black
Foreground
#020408black
#f9fafbghostwhite
Card
#fcfcfdwhite
#030407black
Card foreground
#020408black
#f9fafbghostwhite
Popover
#fcfcfdwhite
#030407black
Popover foreground
#020408black
#f9fafbghostwhite
Primary
#1a3584midnightblue
#1a3584midnightblue
Primary foreground
#d9e0f7lavender
#d9e0f7lavender
Secondary
#e6e7ealavender
#1d1f25black
Secondary foreground
#4a4c55darkslategray
#b1b6c3silver
Muted
#d9dbe3gainsboro
#1c1e26black
Muted foreground
#3c3e44darkslategray
#bbbdc3silver
Accent
#e6e7ealavender
#1d1f25black
Accent foreground
#4a4c55darkslategray
#b1b6c3silver
Destructive
#881402darkred
#ec2304orangered
Destructive foreground
#fec6bepink
#ffffffwhite
Border
#040404black
#22242adarkslategray
Input
#000000black
#22242adarkslategray
Ring
#1a3584midnightblue
#1a3584midnightblue

Contrast

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

Light mode
Text on background20.01:1AAA
Text on card20.01:1AAA
Primary button8.49:1AAA
Secondary button6.93:1AA
Muted text7.73:1AAA
Accent6.93:1AA
Destructive6.55:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button8.49:1AAA
Secondary button8.11:1AAA
Muted text8.81:1AAA
Accent8.11:1AAA
Destructive4.36:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 271.394);
  --foreground: oklch(0.104 0.016 263.804);
  --muted: oklch(0.892 0.011 271.289);
  --muted-foreground: oklch(0.364 0.01 271.129);
  --popover: oklch(0.991 0.002 271.394);
  --popover-foreground: oklch(0.104 0.016 263.804);
  --card: oklch(0.991 0.002 271.394);
  --card-foreground: oklch(0.104 0.016 263.804);
  --border: oklch(0.106 0 180);
  --input: oklch(0 0 0);
  --primary: oklch(0.361 0.137 265.687);
  --primary-foreground: oklch(0.909 0.033 271.042);
  --secondary: oklch(0.929 0.003 271.376);
  --secondary-foreground: oklch(0.418 0.014 271.062);
  --accent: oklch(0.929 0.003 271.376);
  --accent-foreground: oklch(0.418 0.014 271.062);
  --destructive: oklch(0.403 0.152 31.657);
  --destructive-foreground: oklch(0.875 0.065 28.499);
  --ring: oklch(0.361 0.137 265.687);
  --chart-1: oklch(0.361 0.137 265.687);
  --chart-2: oklch(0.929 0.003 271.376);
  --chart-3: oklch(0.929 0.003 271.376);
  --chart-4: oklch(0.953 0.002 271.387);
  --chart-5: oklch(0.359 0.143 265.435);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.009 267.627);
  --foreground: oklch(0.984 0.001 271.395);
  --muted: oklch(0.238 0.016 270.673);
  --muted-foreground: oklch(0.8 0.008 271.311);
  --popover: oklch(0.109 0.009 267.627);
  --popover-foreground: oklch(0.984 0.001 271.395);
  --card: oklch(0.109 0.009 267.627);
  --card-foreground: oklch(0.984 0.001 271.395);
  --border: oklch(0.262 0.011 270.968);
  --input: oklch(0.262 0.011 270.968);
  --primary: oklch(0.361 0.137 265.687);
  --primary-foreground: oklch(0.909 0.033 271.042);
  --secondary: oklch(0.24 0.013 270.836);
  --secondary-foreground: oklch(0.776 0.02 271.157);
  --accent: oklch(0.24 0.013 270.836);
  --accent-foreground: oklch(0.776 0.02 271.157);
  --destructive: oklch(0.603 0.233 30.987);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.361 0.137 265.687);
  --chart-1: oklch(0.361 0.137 265.687);
  --chart-2: oklch(0.24 0.013 270.836);
  --chart-3: oklch(0.24 0.013 270.836);
  --chart-4: oklch(0.27 0.015 270.796);
  --chart-5: oklch(0.359 0.143 265.435);
}