Viow Flat for shadcn/ui

Viow Flat is a shadcn/ui theme built around a neutral gray primary color (#cccccc) with muted deep blue accents (#373e58). The light mode uses a blue-tinted background (#1a1d29). Dark mode keeps the neutral gray primary (#cccccc) on a blue-tinted background (#1a1d29).

Color palette

TokenLightDark
Background
#1a1d29black
#1a1d29black
Foreground
#d4d1c9lightgrey
#d4d1c9lightgrey
Card
#161823black
#161823black
Card foreground
#dfddd7gainsboro
#dfddd7gainsboro
Popover
#14161fblack
#14161fblack
Popover foreground
#ebe9e6linen
#ebe9e6linen
Primary
#cccccclightgrey
#cccccclightgrey
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#262831darkslategray
#262831darkslategray
Muted foreground
#a1a5b5darkgray
#a1a5b5darkgray
Accent
#373e58darkslategray
#373e58darkslategray
Accent foreground
#d9dce7gainsboro
#d9dce7gainsboro
Destructive
#e72618crimson
#e72618crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#282a34darkslategray
#282a34darkslategray
Input
#2f313ddarkslategray
#2f313ddarkslategray
Ring
#cccccclightgrey
#cccccclightgrey

Contrast

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

Light mode
Text on background11.04:1AAA
Text on card13.00:1AAA
Primary button7.86:1AAA
Secondary button7.37:1AAA
Muted text5.97:1AA
Accent7.74:1AAA
Destructive4.48:1AA Large
Dark mode
Text on background11.04:1AAA
Text on card13.00:1AAA
Primary button7.86:1AAA
Secondary button7.37:1AAA
Muted text5.97:1AA
Accent7.74:1AAA
Destructive4.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.232 0.024 273.512);
  --foreground: oklch(0.861 0.011 90.216);
  --muted: oklch(0.279 0.016 274.278);
  --muted-foreground: oklch(0.723 0.024 274.609);
  --popover: oklch(0.202 0.019 273.666);
  --popover-foreground: oklch(0.935 0.005 90.163);
  --card: oklch(0.212 0.021 273.609);
  --card-foreground: oklch(0.898 0.008 90.189);
  --border: oklch(0.288 0.018 274.19);
  --input: oklch(0.317 0.02 274.155);
  --primary: oklch(0.845 0 164.055);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.368 0.046 273.137);
  --accent-foreground: oklch(0.896 0.016 274.816);
  --destructive: oklch(0.596 0.226 29.642);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.845 0 164.055);
  --chart-1: oklch(0.845 0 164.055);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.368 0.046 273.137);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.843 0.003 17.225);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.232 0.024 273.512);
  --foreground: oklch(0.861 0.011 90.216);
  --muted: oklch(0.279 0.016 274.278);
  --muted-foreground: oklch(0.723 0.024 274.609);
  --popover: oklch(0.202 0.019 273.666);
  --popover-foreground: oklch(0.935 0.005 90.163);
  --card: oklch(0.212 0.021 273.609);
  --card-foreground: oklch(0.898 0.008 90.189);
  --border: oklch(0.288 0.018 274.19);
  --input: oklch(0.317 0.02 274.155);
  --primary: oklch(0.845 0 164.055);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.368 0.046 273.137);
  --accent-foreground: oklch(0.896 0.016 274.816);
  --destructive: oklch(0.596 0.226 29.642);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.845 0 164.055);
  --chart-1: oklch(0.845 0 164.055);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.368 0.046 273.137);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.843 0.003 17.225);
}