Target for shadcn/ui

Target is a shadcn/ui theme built around a deep blue primary color (#0c2755) with deep indigo accents (#160c55). The light mode uses a neutral background (#f7f9fd). Dark mode keeps the deep blue primary (#0c2755) on a neutral background (#010204).

Color palette

TokenLightDark
Background
#f7f9fdghostwhite
#010204black
Foreground
#010204black
#fcfcfdwhite
Card
#f3f6fbaliceblue
#020408black
Card foreground
#000000black
#ffffffwhite
Popover
#f3f6fbaliceblue
#020408black
Popover foreground
#000000black
#ffffffwhite
Primary
#0c2755midnightblue
#0c2755midnightblue
Primary foreground
#a1bff2lightsteelblue
#a1bff2lightsteelblue
Secondary
#0c4b55darkslategray
#0c4b55darkslategray
Secondary foreground
#a1e7f2paleturquoise
#a1e7f2paleturquoise
Muted
#c9e4e8gainsboro
#173136darkslategray
Muted foreground
#5f6263dimgray
#9ca0a0darkgray
Accent
#160c55midnightblue
#160c55midnightblue
Accent foreground
#aca1f2lightsteelblue
#aca1f2lightsteelblue
Destructive
#b74706saddlebrown
#f8762atomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0c2755midnightblue
#0c2755midnightblue

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.43:1AAA
Primary button7.84:1AAA
Secondary button7.06:1AAA
Muted text4.61:1AA
Accent7.50:1AAA
Destructive5.37:1AA
Dark mode
Text on background20.22:1AAA
Text on card20.47:1AAA
Primary button7.84:1AAA
Secondary button7.06:1AAA
Muted text5.17:1AA
Accent7.50:1AAA
Destructive7.62:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 261.513);
  --foreground: oklch(0.084 0.013 251.515);
  --muted: oklch(0.901 0.029 207.84);
  --muted-foreground: oklch(0.494 0.004 207.897);
  --popover: oklch(0.973 0.008 261.511);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.973 0.008 261.511);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.282 0.09 260.55);
  --primary-foreground: oklch(0.8 0.079 261.223);
  --secondary: oklch(0.381 0.061 210.654);
  --secondary-foreground: oklch(0.885 0.071 207.977);
  --accent: oklch(0.234 0.121 277.475);
  --accent-foreground: oklch(0.75 0.115 289.445);
  --destructive: oklch(0.542 0.159 42.76);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.282 0.09 260.55);
  --chart-1: oklch(0.282 0.09 260.55);
  --chart-2: oklch(0.381 0.061 210.654);
  --chart-3: oklch(0.234 0.121 277.475);
  --chart-4: oklch(0.42 0.068 210.836);
  --chart-5: oklch(0.282 0.093 260.581);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.01 254.067);
  --foreground: oklch(0.992 0.002 261.514);
  --muted: oklch(0.296 0.033 208.402);
  --muted-foreground: oklch(0.702 0.004 207.909);
  --popover: oklch(0.109 0.013 254.067);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.109 0.013 254.067);
  --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.282 0.09 260.55);
  --primary-foreground: oklch(0.8 0.079 261.223);
  --secondary: oklch(0.381 0.061 210.654);
  --secondary-foreground: oklch(0.885 0.071 207.977);
  --accent: oklch(0.234 0.121 277.475);
  --accent-foreground: oklch(0.75 0.115 289.445);
  --destructive: oklch(0.709 0.18 46.26);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.282 0.09 260.55);
  --chart-1: oklch(0.282 0.09 260.55);
  --chart-2: oklch(0.381 0.061 210.654);
  --chart-3: oklch(0.234 0.121 277.475);
  --chart-4: oklch(0.42 0.068 210.836);
  --chart-5: oklch(0.282 0.093 260.581);
}