NCC site for shadcn/ui

NCC site is a shadcn/ui theme built around a neutral gray primary color (#878787) with muted light red accents (#d8c5c5). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#878787) on a red-tinted background (#0b0404).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0404black
Foreground
#000000black
#ffffffwhite
Card
#ffffffwhite
#0b0404black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#0b0404black
Popover foreground
#000000black
#ffffffwhite
Primary
#878787gray
#878787gray
Primary foreground
#000000black
#000000black
Secondary
#e4ddddgainsboro
#211717black
Secondary foreground
#4f4040darkslategray
#c2a8a8darkgray
Muted
#e1dbdbgainsboro
#241e1eblack
Muted foreground
#696363dimgray
#9c9696darkgray
Accent
#d8c5c5thistle
#402626darkslategray
Accent foreground
#402b2bdarkslategray
#d9bfbfthistle
Destructive
#720904maroon
#f94339tomato
Destructive foreground
#fcafablightpink
#ffffffwhite
Border
#e6e5e5gainsboro
#1a1919black
Input
#e6e5e5gainsboro
#1a1919black
Ring
#878787gray
#878787gray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button5.85:1AA
Secondary button7.32:1AAA
Muted text4.30:1AA Large
Accent7.94:1AAA
Destructive6.76:1AA
Dark mode
Text on background20.32:1AAA
Text on card20.32:1AAA
Primary button5.85:1AA
Secondary button7.88:1AAA
Muted text5.62:1AA
Accent7.98:1AAA
Destructive3.57:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.896 0.007 17.279);
  --muted-foreground: oklch(0.505 0.008 17.414);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.923 0.001 17.178);
  --input: oklch(0.923 0.001 17.178);
  --primary: oklch(0.624 0 180);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.903 0.007 17.293);
  --secondary-foreground: oklch(0.386 0.022 18.142);
  --accent: oklch(0.839 0.022 17.596);
  --accent-foreground: oklch(0.314 0.032 19.021);
  --destructive: oklch(0.352 0.137 29.744);
  --destructive-foreground: oklch(0.827 0.092 22.584);
  --ring: oklch(0.624 0 180);
  --chart-1: oklch(0.624 0 180);
  --chart-2: oklch(0.903 0.007 17.293);
  --chart-3: oklch(0.839 0.022 17.596);
  --chart-4: oklch(0.927 0.005 17.256);
  --chart-5: oklch(0.618 0.009 17.392);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.018 19.969);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.243 0.009 17.807);
  --muted-foreground: oklch(0.678 0.007 17.334);
  --popover: oklch(0.121 0.018 19.969);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.121 0.018 19.969);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.215 0.002 17.281);
  --input: oklch(0.215 0.002 17.281);
  --primary: oklch(0.624 0 180);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.217 0.016 18.495);
  --secondary-foreground: oklch(0.754 0.031 17.864);
  --accent: oklch(0.301 0.04 19.702);
  --accent-foreground: oklch(0.826 0.03 17.78);
  --destructive: oklch(0.651 0.22 28.043);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.624 0 180);
  --chart-1: oklch(0.624 0 180);
  --chart-2: oklch(0.217 0.016 18.495);
  --chart-3: oklch(0.301 0.04 19.702);
  --chart-4: oklch(0.248 0.02 18.617);
  --chart-5: oklch(0.618 0.009 17.392);
}