Knobby for shadcn/ui

Knobby is a shadcn/ui theme built around a red primary color (#b2241f) with teal accents (#1fadb2). The light mode uses a neutral background (#ffffff). Dark mode keeps the red primary (#b2241f) on a red-tinted background (#0e0606).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e0606black
Foreground
#040101black
#ffffffwhite
Card
#ffffffwhite
#0e0606black
Card foreground
#040101black
#ffffffwhite
Popover
#ffffffwhite
#0e0606black
Popover foreground
#040101black
#ffffffwhite
Primary
#b2241ffirebrick
#b2241ffirebrick
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#1fadb2lightseagreen
#1fadb2lightseagreen
Secondary foreground
#010404black
#010404black
Muted
#ebf4f4whitesmoke
#0b1314black
Muted foreground
#414444darkslategray
#bbbebesilver
Accent
#1fadb2lightseagreen
#1fadb2lightseagreen
Accent foreground
#010404black
#010404black
Destructive
#bc2110firebrick
#e12814crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b2241ffirebrick
#b2241ffirebrick

Contrast

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

Light mode
Text on background20.79:1AAA
Text on card20.79:1AAA
Primary button6.64:1AA
Secondary button7.51:1AAA
Muted text8.78:1AAA
Accent7.51:1AAA
Destructive6.24:1AA
Dark mode
Text on background20.01:1AAA
Text on card20.01:1AAA
Primary button6.64:1AA
Secondary button7.51:1AAA
Muted text10.02:1AAA
Accent7.51:1AAA
Destructive4.64:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.082 0.016 24.786);
  --muted: oklch(0.96 0.009 199.481);
  --muted-foreground: oklch(0.383 0.003 199.484);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.082 0.016 24.786);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.082 0.016 24.786);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.498 0.178 27.977);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.681 0.11 198.617);
  --secondary-foreground: oklch(0.1 0.013 197.338);
  --accent: oklch(0.681 0.11 198.617);
  --accent-foreground: oklch(0.1 0.013 197.338);
  --destructive: oklch(0.513 0.191 30.52);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.498 0.178 27.977);
  --chart-1: oklch(0.498 0.178 27.977);
  --chart-2: oklch(0.681 0.11 198.617);
  --chart-3: oklch(0.681 0.11 198.617);
  --chart-4: oklch(0.717 0.116 198.626);
  --chart-5: oklch(0.501 0.183 28.251);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.016 22.168);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.18 0.012 198.777);
  --muted-foreground: oklch(0.799 0.003 199.557);
  --popover: oklch(0.137 0.016 22.168);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.137 0.016 22.168);
  --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.498 0.178 27.977);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.681 0.11 198.617);
  --secondary-foreground: oklch(0.1 0.013 197.338);
  --accent: oklch(0.681 0.11 198.617);
  --accent-foreground: oklch(0.1 0.013 197.338);
  --destructive: oklch(0.587 0.22 30.513);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.498 0.178 27.977);
  --chart-1: oklch(0.498 0.178 27.977);
  --chart-2: oklch(0.681 0.11 198.617);
  --chart-3: oklch(0.681 0.11 198.617);
  --chart-4: oklch(0.717 0.116 198.626);
  --chart-5: oklch(0.501 0.183 28.251);
}