Knobby for shadcn/ui

Knobby is a shadcn/ui theme built around a muted light violet primary color (#cec3d5) with muted light teal accents (#c3d5ce). The light mode uses a neutral background (#faf8fc). Dark mode keeps the muted light violet primary (#cec3d5) on a violet-tinted background (#0b050f).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#0b050fblack
Foreground
#000000black
#fdfcfdwhite
Card
#faf8fcghostwhite
#0b050fblack
Card foreground
#000000black
#fdfcfdwhite
Popover
#faf8fcghostwhite
#0b050fblack
Popover foreground
#000000black
#fdfcfdwhite
Primary
#cec3d5thistle
#cec3d5thistle
Primary foreground
#352a3cdarkslategray
#352a3cdarkslategray
Secondary
#d5cec3lightgrey
#d5cec3lightgrey
Secondary foreground
#3c352adarkslategray
#3c352adarkslategray
Muted
#ecebe9linen
#161513black
Muted foreground
#675c4cdimgray
#b3a998darkgray
Accent
#c3d5celightgrey
#c3d5celightgrey
Accent foreground
#2a3c35darkslategray
#2a3c35darkslategray
Destructive
#732b0dsaddlebrown
#d35017chocolate
Destructive foreground
#f7cdbapeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cec3d5thistle
#cec3d5thistle

Contrast

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

Light mode
Text on background19.92:1AAA
Text on card19.92:1AAA
Primary button7.99:1AAA
Secondary button7.76:1AAA
Muted text5.48:1AA
Accent7.65:1AAA
Destructive6.91:1AA
Dark mode
Text on background19.65:1AAA
Text on card19.65:1AAA
Primary button7.99:1AAA
Secondary button7.76:1AAA
Muted text7.87:1AAA
Accent7.65:1AAA
Destructive4.26:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 312.95);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.94 0.003 79.928);
  --muted-foreground: oklch(0.481 0.029 79.65);
  --popover: oklch(0.982 0.005 312.95);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.005 312.95);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.831 0.028 312.756);
  --primary-foreground: oklch(0.305 0.036 312.182);
  --secondary: oklch(0.854 0.017 79.886);
  --secondary-foreground: oklch(0.333 0.021 79.603);
  --accent: oklch(0.858 0.022 170.834);
  --accent-foreground: oklch(0.339 0.027 169.064);
  --destructive: oklch(0.389 0.109 40.871);
  --destructive-foreground: oklch(0.879 0.055 44.46);
  --ring: oklch(0.831 0.028 312.756);
  --chart-1: oklch(0.831 0.028 312.756);
  --chart-2: oklch(0.854 0.017 79.886);
  --chart-3: oklch(0.858 0.022 170.834);
  --chart-4: oklch(0.877 0.015 79.897);
  --chart-5: oklch(0.829 0.033 312.717);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.133 0.027 313.051);
  --foreground: oklch(0.992 0.002 312.973);
  --muted: oklch(0.195 0.004 79.877);
  --muted-foreground: oklch(0.738 0.026 79.822);
  --popover: oklch(0.133 0.027 313.051);
  --popover-foreground: oklch(0.992 0.002 312.973);
  --card: oklch(0.133 0.027 313.051);
  --card-foreground: oklch(0.992 0.002 312.973);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.831 0.028 312.756);
  --primary-foreground: oklch(0.305 0.036 312.182);
  --secondary: oklch(0.854 0.017 79.886);
  --secondary-foreground: oklch(0.333 0.021 79.603);
  --accent: oklch(0.858 0.022 170.834);
  --accent-foreground: oklch(0.339 0.027 169.064);
  --destructive: oklch(0.6 0.177 39.986);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.831 0.028 312.756);
  --chart-1: oklch(0.831 0.028 312.756);
  --chart-2: oklch(0.854 0.017 79.886);
  --chart-3: oklch(0.858 0.022 170.834);
  --chart-4: oklch(0.877 0.015 79.897);
  --chart-5: oklch(0.829 0.033 312.717);
}