Knowing for shadcn/ui

Knowing is a shadcn/ui theme built around a violet primary color (#5b427b) with green accents (#627b42). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#5b427b) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#020104black
#f7f5fawhitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#020104black
#f7f5fawhitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#020104black
#f7f5fawhitesmoke
Primary
#5b427bdarkslateblue
#5b427bdarkslateblue
Primary foreground
#f7f5fawhitesmoke
#f7f5fawhitesmoke
Secondary
#627b42darkolivegreen
#627b42darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e1e7d9gainsboro
#202618black
Muted foreground
#4b553fdarkolivegreen
#b7c0aasilver
Accent
#627b42darkolivegreen
#627b42darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#652601maroon
#fe7120tomato
Destructive foreground
#febf9anavajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5b427bdarkslateblue
#5b427bdarkslateblue

Contrast

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

Light mode
Text on background20.81:1AAA
Text on card20.81:1AAA
Primary button7.74:1AAA
Secondary button4.75:1AA
Muted text6.25:1AA
Accent4.75:1AA
Destructive7.17:1AAA
Dark mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button7.74:1AAA
Secondary button4.75:1AA
Muted text8.27:1AAA
Accent4.75:1AA
Destructive7.60:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.082 0.015 306.837);
  --muted: oklch(0.921 0.02 126.03);
  --muted-foreground: oklch(0.435 0.037 126.935);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.082 0.015 306.837);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.082 0.015 306.837);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.432 0.094 302.632);
  --primary-foreground: oklch(0.973 0.006 305.652);
  --secondary: oklch(0.548 0.086 128.144);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.548 0.086 128.144);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.356 0.102 44.586);
  --destructive-foreground: oklch(0.853 0.089 51.223);
  --ring: oklch(0.432 0.094 302.632);
  --chart-1: oklch(0.432 0.094 302.632);
  --chart-2: oklch(0.548 0.086 128.144);
  --chart-3: oklch(0.548 0.086 128.144);
  --chart-4: oklch(0.58 0.092 128.167);
  --chart-5: oklch(0.428 0.103 302.244);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.973 0.007 305.646);
  --muted: oklch(0.256 0.027 127.222);
  --muted-foreground: oklch(0.795 0.032 126.292);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.973 0.007 305.646);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.973 0.007 305.646);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.432 0.094 302.632);
  --primary-foreground: oklch(0.973 0.006 305.652);
  --secondary: oklch(0.548 0.086 128.144);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.548 0.086 128.144);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.71 0.191 45.057);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.432 0.094 302.632);
  --chart-1: oklch(0.432 0.094 302.632);
  --chart-2: oklch(0.548 0.086 128.144);
  --chart-3: oklch(0.548 0.086 128.144);
  --chart-4: oklch(0.58 0.092 128.167);
  --chart-5: oklch(0.428 0.103 302.244);
}