Craft for shadcn/ui

Craft is a shadcn/ui theme built around a near-white primary color (#ffffff) with muted light red accents (#dbcdcd). The light mode uses a neutral background (#fdf7f7). Dark mode keeps the near-white primary (#ffffff) on a neutral background (#080303).

Color palette

TokenLightDark
Background
#fdf7f7snow
#080303black
Foreground
#0d0202black
#ffffffwhite
Card
#fcf3f3lavenderblush
#0b0404black
Card foreground
#090101black
#ffffffwhite
Popover
#fdf7f7snow
#080303black
Popover foreground
#0d0202black
#ffffffwhite
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#dbcdcdlightgrey
#312121darkslategray
Secondary foreground
#443131darkslategray
#cdb6b6silver
Muted
#f3ececlinen
#130c0cblack
Muted foreground
#5e5e5edimgray
#a1a1a1darkgray
Accent
#dbcdcdlightgrey
#312121darkslategray
Accent foreground
#443131darkslategray
#cdb6b6silver
Destructive
#dd1608red
#f84235tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background19.27:1AAA
Text on card18.89:1AAA
Primary button12.63:1AAA
Secondary button7.85:1AAA
Muted text5.57:1AA
Accent7.85:1AAA
Destructive4.98:1AA
Dark mode
Text on background20.54:1AAA
Text on card20.32:1AAA
Primary button12.63:1AAA
Secondary button8.01:1AAA
Muted text7.49:1AAA
Accent8.01:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.007 17.272);
  --foreground: oklch(0.114 0.029 22.711);
  --muted: oklch(0.949 0.008 17.291);
  --muted-foreground: oklch(0.483 0 180);
  --popover: oklch(0.98 0.007 17.272);
  --popover-foreground: oklch(0.114 0.029 22.711);
  --card: oklch(0.97 0.01 17.332);
  --card-foreground: oklch(0.099 0.025 22.633);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.859 0.015 17.459);
  --secondary-foreground: oklch(0.336 0.027 18.616);
  --accent: oklch(0.859 0.015 17.459);
  --accent-foreground: oklch(0.336 0.027 18.616);
  --destructive: oklch(0.57 0.226 29.76);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.859 0.015 17.459);
  --chart-3: oklch(0.859 0.015 17.459);
  --chart-4: oklch(0.884 0.013 17.395);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.016 20.039);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.163 0.012 18.495);
  --muted-foreground: oklch(0.708 0 158.199);
  --popover: oklch(0.105 0.016 20.039);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.121 0.018 20.056);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.267 0.024 18.782);
  --secondary-foreground: oklch(0.797 0.027 17.726);
  --accent: oklch(0.267 0.024 18.782);
  --accent-foreground: oklch(0.797 0.027 17.726);
  --destructive: oklch(0.648 0.22 28.816);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.267 0.024 18.782);
  --chart-3: oklch(0.267 0.024 18.782);
  --chart-4: oklch(0.296 0.028 18.864);
  --chart-5: oklch(1 0 180);
}