High-rise for shadcn/ui

High-rise is a shadcn/ui theme built around a near-black primary color (#1f1f1f) with near-black accents (#1f1f1f). The light mode uses a neutral background (#fdf7f7). Dark mode keeps the near-black primary (#1f1f1f) on a red-tinted background (#0d0707).

Color palette

TokenLightDark
Background
#fdf7f7snow
#0d0707black
Foreground
#120303black
#fdfcfcsnow
Card
#fcf3f3lavenderblush
#110909black
Card foreground
#0d0202black
#ffffffwhite
Popover
#fdf7f7snow
#0d0707black
Popover foreground
#120303black
#fdfcfcsnow
Primary
#1f1f1fblack
#1f1f1fblack
Primary foreground
#b8b8b8silver
#b8b8b8silver
Secondary
#1f1f1fblack
#1f1f1fblack
Secondary foreground
#b8b8b8silver
#b8b8b8silver
Muted
#eee8e8linen
#171111black
Muted foreground
#4f4040darkslategray
#bfb0b0silver
Accent
#1f1f1fblack
#1f1f1fblack
Accent foreground
#b8b8b8silver
#b8b8b8silver
Destructive
#99180adarkred
#f24d3atomato
Destructive foreground
#fddcd9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1f1f1fblack
#1f1f1fblack

Contrast

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

Light mode
Text on background19.03:1AAA
Text on card18.72:1AAA
Primary button8.34:1AAA
Secondary button8.34:1AAA
Muted text8.07:1AAA
Accent8.34:1AAA
Destructive6.56:1AA
Dark mode
Text on background19.50:1AAA
Text on card19.71:1AAA
Primary button8.34:1AAA
Secondary button8.34:1AAA
Muted text8.91:1AAA
Accent8.34:1AAA
Destructive3.55:1AA Large

CSS variables

Paste this into your globals.css to use High-rise in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.007 17.268);
  --foreground: oklch(0.128 0.034 23.116);
  --muted: oklch(0.934 0.007 17.275);
  --muted-foreground: oklch(0.386 0.022 18.142);
  --popover: oklch(0.98 0.007 17.268);
  --popover-foreground: oklch(0.128 0.034 23.116);
  --card: oklch(0.971 0.01 17.327);
  --card-foreground: oklch(0.114 0.029 22.864);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.238 0 161.565);
  --primary-foreground: oklch(0.781 0 180);
  --secondary: oklch(0.238 0 161.565);
  --secondary-foreground: oklch(0.781 0 180);
  --accent: oklch(0.238 0 161.565);
  --accent-foreground: oklch(0.781 0 180);
  --destructive: oklch(0.441 0.165 30.515);
  --destructive-foreground: oklch(0.921 0.036 25.359);
  --ring: oklch(0.238 0 161.565);
  --chart-1: oklch(0.238 0 161.565);
  --chart-2: oklch(0.238 0 161.565);
  --chart-3: oklch(0.238 0 161.565);
  --chart-4: oklch(0.27 0 180);
  --chart-5: oklch(0.236 0.003 17.356);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.012 18.732);
  --foreground: oklch(0.991 0.002 17.186);
  --muted: oklch(0.187 0.01 18.105);
  --muted-foreground: oklch(0.77 0.018 17.552);
  --popover: oklch(0.138 0.012 18.732);
  --popover-foreground: oklch(0.991 0.002 17.186);
  --card: oklch(0.15 0.014 18.881);
  --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.238 0 161.565);
  --primary-foreground: oklch(0.781 0 180);
  --secondary: oklch(0.238 0 161.565);
  --secondary-foreground: oklch(0.781 0 180);
  --accent: oklch(0.238 0 161.565);
  --accent-foreground: oklch(0.781 0 180);
  --destructive: oklch(0.65 0.205 29.909);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.238 0 161.565);
  --chart-1: oklch(0.238 0 161.565);
  --chart-2: oklch(0.238 0 161.565);
  --chart-3: oklch(0.238 0 161.565);
  --chart-4: oklch(0.27 0 180);
  --chart-5: oklch(0.236 0.003 17.356);
}