FlatUI Immersed for shadcn/ui

FlatUI Immersed is a shadcn/ui theme built around a neutral gray primary color (#404040) with neutral gray accents (#d4d4d4). The light mode uses a neutral background (#fafafa). Dark mode keeps the neutral gray primary (#404040) on a neutral background (#fafafa).

Color palette

TokenLightDark
Background
#fafafasnow
#fafafasnow
Foreground
#404040darkslategray
#404040darkslategray
Card
#f5f5f5whitesmoke
#f5f5f5whitesmoke
Card foreground
#333333darkslategray
#333333darkslategray
Popover
#f2f2f2whitesmoke
#f2f2f2whitesmoke
Popover foreground
#262626darkslategray
#262626darkslategray
Primary
#404040darkslategray
#404040darkslategray
Primary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Secondary
#bfbfbfsilver
#bfbfbfsilver
Secondary foreground
#262626darkslategray
#262626darkslategray
Muted
#e9e2e2gainsboro
#e9e2e2gainsboro
Muted foreground
#564343darkslategray
#564343darkslategray
Accent
#d4d4d4lightgrey
#d4d4d4lightgrey
Accent foreground
#3b3b3bdarkslategray
#3b3b3bdarkslategray
Destructive
#aa1e09firebrick
#aa1e09firebrick
Destructive foreground
#feeae7linen
#feeae7linen
Border
#edededwhitesmoke
#edededwhitesmoke
Input
#e6e6e6gainsboro
#e6e6e6gainsboro
Ring
#404040darkslategray
#404040darkslategray

Contrast

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

Light mode
Text on background9.92:1AAA
Text on card11.56:1AAA
Primary button7.37:1AAA
Secondary button8.25:1AAA
Muted text7.22:1AAA
Accent7.53:1AAA
Destructive6.26:1AA
Dark mode
Text on background9.92:1AAA
Text on card11.56:1AAA
Primary button7.37:1AAA
Secondary button8.25:1AAA
Muted text7.22:1AAA
Accent7.53:1AAA
Destructive6.26:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0 180);
  --foreground: oklch(0.371 0 168.69);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.962 0 180);
  --popover-foreground: oklch(0.27 0 180);
  --card: oklch(0.97 0 180);
  --card-foreground: oklch(0.321 0 180);
  --border: oklch(0.947 0 180);
  --input: oklch(0.923 0 153.435);
  --primary: oklch(0.371 0 168.69);
  --primary-foreground: oklch(0.885 0 180);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.869 0 165.964);
  --accent-foreground: oklch(0.351 0 167.471);
  --destructive: oklch(0.476 0.177 31.402);
  --destructive-foreground: oklch(0.952 0.022 28.066);
  --ring: oklch(0.371 0 168.69);
  --chart-1: oklch(0.371 0 168.69);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.869 0 165.964);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.367 0.005 17.396);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.985 0 180);
  --foreground: oklch(0.371 0 168.69);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.962 0 180);
  --popover-foreground: oklch(0.27 0 180);
  --card: oklch(0.97 0 180);
  --card-foreground: oklch(0.321 0 180);
  --border: oklch(0.947 0 180);
  --input: oklch(0.923 0 153.435);
  --primary: oklch(0.371 0 168.69);
  --primary-foreground: oklch(0.885 0 180);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.869 0 165.964);
  --accent-foreground: oklch(0.351 0 167.471);
  --destructive: oklch(0.476 0.177 31.402);
  --destructive-foreground: oklch(0.952 0.022 28.066);
  --ring: oklch(0.371 0 168.69);
  --chart-1: oklch(0.371 0 168.69);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.869 0 165.964);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.367 0.005 17.396);
}