Block for shadcn/ui

Block is a shadcn/ui theme built around a near-black primary color (#090109) with near-black accents (#010901). The light mode uses a neutral background (#fefbfe). Dark mode keeps the near-black primary (#090109) on a purple-tinted background (#0b040b).

Color palette

TokenLightDark
Background
#fefbfewhite
#0b040bblack
Foreground
#040104black
#fdfcfdwhite
Card
#fefbfewhite
#0b040bblack
Card foreground
#040104black
#fdfcfdwhite
Popover
#fefbfewhite
#0b040bblack
Popover foreground
#040104black
#fdfcfdwhite
Primary
#090109black
#090109black
Primary foreground
#e458e4orchid
#e458e4orchid
Secondary
#010901black
#010901black
Secondary foreground
#1eb81elimegreen
#1eb81elimegreen
Muted
#e5f1e5beige
#0e1a0eblack
Muted foreground
#3a4a3adarkslategray
#b5c5b5silver
Accent
#010901black
#010901black
Accent foreground
#1eb81elimegreen
#1eb81elimegreen
Destructive
#97110cdarkred
#d91812crimson
Destructive foreground
#fcdad9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#090109black
#090109black

Contrast

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

Light mode
Text on background20.21:1AAA
Text on card20.21:1AAA
Primary button6.67:1AA
Secondary button7.62:1AAA
Muted text8.09:1AAA
Accent7.62:1AAA
Destructive6.73:1AA
Dark mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button6.67:1AA
Secondary button7.62:1AAA
Muted text9.87:1AAA
Accent7.62:1AAA
Destructive5.13:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 325.613);
  --foreground: oklch(0.086 0.022 327.304);
  --muted: oklch(0.945 0.02 145.414);
  --muted-foreground: oklch(0.391 0.033 144.904);
  --popover: oklch(0.991 0.005 325.613);
  --popover-foreground: oklch(0.086 0.022 327.304);
  --card: oklch(0.991 0.005 325.613);
  --card-foreground: oklch(0.086 0.022 327.304);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.106 0.033 327.581);
  --primary-foreground: oklch(0.693 0.233 327.733);
  --secondary: oklch(0.124 0.031 143.427);
  --secondary-foreground: oklch(0.682 0.22 142.676);
  --accent: oklch(0.124 0.031 143.427);
  --accent-foreground: oklch(0.682 0.22 142.676);
  --destructive: oklch(0.432 0.167 28.894);
  --destructive-foreground: oklch(0.917 0.037 20.208);
  --ring: oklch(0.106 0.033 327.581);
  --chart-1: oklch(0.106 0.033 327.581);
  --chart-2: oklch(0.124 0.031 143.427);
  --chart-3: oklch(0.124 0.031 143.427);
  --chart-4: oklch(0.177 0.047 143.295);
  --chart-5: oklch(0.106 0.034 327.664);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.022 326.78);
  --foreground: oklch(0.992 0.001 325.583);
  --muted: oklch(0.204 0.029 144.432);
  --muted-foreground: oklch(0.806 0.028 145.308);
  --popover: oklch(0.126 0.022 326.78);
  --popover-foreground: oklch(0.992 0.001 325.583);
  --card: oklch(0.126 0.022 326.78);
  --card-foreground: oklch(0.992 0.001 325.583);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.106 0.033 327.581);
  --primary-foreground: oklch(0.693 0.233 327.733);
  --secondary: oklch(0.124 0.031 143.427);
  --secondary-foreground: oklch(0.682 0.22 142.676);
  --accent: oklch(0.124 0.031 143.427);
  --accent-foreground: oklch(0.682 0.22 142.676);
  --destructive: oklch(0.563 0.221 29.071);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.106 0.033 327.581);
  --chart-1: oklch(0.106 0.033 327.581);
  --chart-2: oklch(0.124 0.031 143.427);
  --chart-3: oklch(0.124 0.031 143.427);
  --chart-4: oklch(0.177 0.047 143.295);
  --chart-5: oklch(0.106 0.034 327.664);
}