Turning for shadcn/ui

Turning is a shadcn/ui theme built around a near-black primary color (#000000) with muted light red accents (#e0cdcd). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#000000) on a neutral background (#040101).

Color palette

TokenLightDark
Background
#ffffffwhite
#040101black
Foreground
#090101black
#fdfbfbsnow
Card
#fcfcfcsnow
#080202black
Card foreground
#050101black
#ffffffwhite
Popover
#ffffffwhite
#040101black
Popover foreground
#090101black
#fdfbfbsnow
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#e9e2e2gainsboro
#2f2d2ddarkslategray
Secondary foreground
#564343darkslategray
#c9c5c5silver
Muted
#ecd5d5gainsboro
#2a1313black
Muted foreground
#4b4848darkslategray
#b7b4b4silver
Accent
#e0cdcdlightgrey
#483d3ddarkslategray
Accent foreground
#4b2f2fdarkslategray
#ded8d8gainsboro
Destructive
#ca2d02firebrick
#fd6035tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000000black
#000000black

Contrast

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

Light mode
Text on background20.66:1AAA
Text on card20.31:1AAA
Primary button7.37:1AAA
Secondary button7.21:1AAA
Muted text6.48:1AA
Accent7.87:1AAA
Destructive5.39:1AA
Dark mode
Text on background20.16:1AAA
Text on card20.57:1AAA
Primary button7.37:1AAA
Secondary button8.03:1AAA
Muted text8.48:1AAA
Accent7.43:1AAA
Destructive6.91:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.027 23.605);
  --muted: oklch(0.892 0.025 17.634);
  --muted-foreground: oklch(0.406 0.004 17.319);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.027 23.605);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.078 0.022 23.605);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.919 0.007 17.288);
  --secondary-foreground: oklch(0.402 0.028 18.365);
  --accent: oklch(0.863 0.021 17.567);
  --accent-foreground: oklch(0.34 0.042 19.443);
  --destructive: oklch(0.548 0.197 33.683);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.919 0.007 17.288);
  --chart-3: oklch(0.863 0.021 17.567);
  --chart-4: oklch(0.943 0.005 17.246);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.082 0.015 20.892);
  --foreground: oklch(0.991 0.002 17.194);
  --muted: oklch(0.221 0.037 20.52);
  --muted-foreground: oklch(0.771 0.003 17.23);
  --popover: oklch(0.082 0.015 20.892);
  --popover-foreground: oklch(0.991 0.002 17.194);
  --card: oklch(0.103 0.019 20.892);
  --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 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.298 0.004 17.38);
  --secondary-foreground: oklch(0.827 0.004 17.233);
  --accent: oklch(0.371 0.015 17.839);
  --accent-foreground: oklch(0.888 0.006 17.275);
  --destructive: oklch(0.688 0.2 35.98);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.298 0.004 17.38);
  --chart-3: oklch(0.371 0.015 17.839);
  --chart-4: oklch(0.328 0.005 17.388);
  --chart-5: oklch(0 0 0);
}