Flip-flops for shadcn/ui

Flip-flops is a shadcn/ui theme built around a muted deep blue primary color (#303641) with muted deep indigo accents (#313041). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep blue primary (#303641) on a neutral background (#010204).

Color palette

TokenLightDark
Background
#ffffffwhite
#010204black
Foreground
#000000black
#f9fafaghostwhite
Card
#fcfcfcsnow
#020508black
Card foreground
#000000black
#fcfcfdwhite
Popover
#ffffffwhite
#010204black
Popover foreground
#000000black
#f9fafaghostwhite
Primary
#303641darkslategray
#303641darkslategray
Primary foreground
#cad0d8lightgrey
#cad0d8lightgrey
Secondary
#303f41darkslategray
#303f41darkslategray
Secondary foreground
#cad7d8lightgrey
#cad7d8lightgrey
Muted
#e5eff1lavender
#0e191ablack
Muted foreground
#364749darkslategray
#b6c7c9silver
Accent
#313041darkslategray
#313041darkslategray
Accent foreground
#cccad8lightgrey
#cccad8lightgrey
Destructive
#d12e0afirebrick
#f55632tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#303641darkslategray
#303641darkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.79:1AAA
Secondary button7.45:1AAA
Muted text8.34:1AAA
Accent8.00:1AAA
Destructive5.08:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.95:1AAA
Primary button7.79:1AAA
Secondary button7.45:1AAA
Muted text10.21:1AAA
Accent8.00:1AAA
Destructive6.27:1AA

CSS variables

Paste this into your globals.css to use Flip-flops in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.945 0.011 204.901);
  --muted-foreground: oklch(0.385 0.022 204.696);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.332 0.02 258.37);
  --primary-foreground: oklch(0.855 0.013 258.347);
  --secondary: oklch(0.354 0.02 204.698);
  --secondary-foreground: oklch(0.869 0.014 204.877);
  --accent: oklch(0.317 0.03 289.157);
  --accent-foreground: oklch(0.845 0.019 290.587);
  --destructive: oklch(0.562 0.203 32.859);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.332 0.02 258.37);
  --chart-1: oklch(0.332 0.02 258.37);
  --chart-2: oklch(0.354 0.02 204.698);
  --chart-3: oklch(0.317 0.03 289.157);
  --chart-4: oklch(0.385 0.022 204.696);
  --chart-5: oklch(0.331 0.024 258.362);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.01 250.464);
  --foreground: oklch(0.984 0.001 258.315);
  --muted: oklch(0.204 0.016 204.69);
  --muted-foreground: oklch(0.817 0.019 204.83);
  --popover: oklch(0.087 0.01 250.464);
  --popover-foreground: oklch(0.984 0.001 258.315);
  --card: oklch(0.109 0.013 250.464);
  --card-foreground: oklch(0.992 0.001 258.314);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.332 0.02 258.37);
  --primary-foreground: oklch(0.855 0.013 258.347);
  --secondary: oklch(0.354 0.02 204.698);
  --secondary-foreground: oklch(0.869 0.014 204.877);
  --accent: oklch(0.317 0.03 289.157);
  --accent-foreground: oklch(0.845 0.019 290.587);
  --destructive: oklch(0.664 0.201 34.073);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.332 0.02 258.37);
  --chart-1: oklch(0.332 0.02 258.37);
  --chart-2: oklch(0.354 0.02 204.698);
  --chart-3: oklch(0.317 0.03 289.157);
  --chart-4: oklch(0.385 0.022 204.696);
  --chart-5: oklch(0.331 0.024 258.362);
}