Flag for shadcn/ui

Flag is a shadcn/ui theme built around a muted deep purple primary color (#181519) with muted deep pink accents (#191518). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted deep purple primary (#181519) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fdfbfewhite
#030203black
Foreground
#040104black
#fdfcfdwhite
Card
#fcf7fdghostwhite
#060307black
Card foreground
#000000black
#ffffffwhite
Popover
#fcf7fdghostwhite
#060307black
Popover foreground
#000000black
#ffffffwhite
Primary
#181519black
#181519black
Primary foreground
#b5a9b7darkgray
#b5a9b7darkgray
Secondary
#161519black
#161519black
Secondary foreground
#aea9b7darkgray
#aea9b7darkgray
Muted
#f1eef6whitesmoke
#0b0911black
Muted foreground
#615775dimgray
#948aa8lightslategray
Accent
#191518black
#191518black
Accent foreground
#b7a9b2darkgray
#b7a9b2darkgray
Destructive
#973011saddlebrown
#e75023chocolate
Destructive foreground
#fbe6dfmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#181519black
#181519black

Contrast

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

Light mode
Text on background20.19:1AAA
Text on card19.86:1AAA
Primary button8.03:1AAA
Secondary button7.92:1AAA
Muted text5.86:1AA
Accent8.03:1AAA
Destructive6.33:1AA
Dark mode
Text on background20.26:1AAA
Text on card20.48:1AAA
Primary button8.03:1AAA
Secondary button7.92:1AAA
Muted text6.08:1AA
Accent8.03:1AAA
Destructive3.77:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 320.538);
  --foreground: oklch(0.082 0.026 323.02);
  --muted: oklch(0.955 0.011 301.316);
  --muted-foreground: oklch(0.477 0.05 299.782);
  --popover: oklch(0.982 0.009 320.546);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.009 320.546);
  --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.201 0.01 320.605);
  --primary-foreground: oklch(0.749 0.024 320.581);
  --secondary: oklch(0.199 0.008 300.81);
  --secondary-foreground: oklch(0.743 0.021 301.041);
  --accent: oklch(0.201 0.008 338.092);
  --accent-foreground: oklch(0.749 0.021 337.82);
  --destructive: oklch(0.461 0.144 36.286);
  --destructive-foreground: oklch(0.939 0.026 37.636);
  --ring: oklch(0.201 0.01 320.605);
  --chart-1: oklch(0.201 0.01 320.605);
  --chart-2: oklch(0.199 0.008 300.81);
  --chart-3: oklch(0.201 0.008 338.092);
  --chart-4: oklch(0.23 0.011 300.735);
  --chart-5: oklch(0.2 0.013 320.628);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.012 321.731);
  --foreground: oklch(0.991 0.002 320.535);
  --muted: oklch(0.147 0.017 299.75);
  --muted-foreground: oklch(0.652 0.046 300.342);
  --popover: oklch(0.11 0.016 321.731);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.11 0.016 321.731);
  --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.201 0.01 320.605);
  --primary-foreground: oklch(0.749 0.024 320.581);
  --secondary: oklch(0.199 0.008 300.81);
  --secondary-foreground: oklch(0.743 0.021 301.041);
  --accent: oklch(0.201 0.008 338.092);
  --accent-foreground: oklch(0.749 0.021 337.82);
  --destructive: oklch(0.632 0.194 36.455);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.201 0.01 320.605);
  --chart-1: oklch(0.201 0.01 320.605);
  --chart-2: oklch(0.199 0.008 300.81);
  --chart-3: oklch(0.201 0.008 338.092);
  --chart-4: oklch(0.23 0.011 300.735);
  --chart-5: oklch(0.2 0.013 320.628);
}