General for shadcn/ui

General is a shadcn/ui theme built around a muted cyan primary color (#3f575a) with muted light cyan accents (#e4ebec). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the muted cyan primary (#3f575a) on a cyan-tinted background (#030b0c).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#030b0cblack
Foreground
#020809black
#fcfdfdwhite
Card
#f8fbfcghostwhite
#040f10black
Card foreground
#010404black
#ffffffwhite
Popover
#f8fbfcghostwhite
#040f10black
Popover foreground
#010404black
#ffffffwhite
Primary
#3f575adarkslategray
#3f575adarkslategray
Primary foreground
#e1e9ealavender
#e1e9ealavender
Secondary
#e4ebeclavender
#273335darkslategray
Secondary foreground
#42585cdarkslategray
#becdcfsilver
Muted
#cce2e6gainsboro
#193033darkslategray
Muted foreground
#3e4141darkslategray
#bec0c1silver
Accent
#e4ebeclavender
#273335darkslategray
Accent foreground
#42585cdarkslategray
#becdcfsilver
Destructive
#a4400asaddlebrown
#e3580dchocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3f575adarkslategray
#3f575adarkslategray

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.82:1AAA
Primary button6.29:1AA
Secondary button6.24:1AA
Muted text7.66:1AAA
Accent6.24:1AA
Destructive6.35:1AA
Dark mode
Text on background19.49:1AAA
Text on card19.45:1AAA
Primary button6.29:1AA
Secondary button7.96:1AAA
Muted text7.61:1AAA
Accent7.96:1AAA
Destructive3.71:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 207.926);
  --foreground: oklch(0.123 0.015 204.338);
  --muted: oklch(0.898 0.024 207.846);
  --muted-foreground: oklch(0.372 0.003 207.899);
  --popover: oklch(0.987 0.003 207.918);
  --popover-foreground: oklch(0.098 0.012 204.338);
  --card: oklch(0.987 0.003 207.918);
  --card-foreground: oklch(0.098 0.012 204.338);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.437 0.03 207.899);
  --primary-foreground: oklch(0.928 0.009 207.895);
  --secondary: oklch(0.935 0.007 207.902);
  --secondary-foreground: oklch(0.445 0.027 207.872);
  --accent: oklch(0.935 0.007 207.902);
  --accent-foreground: oklch(0.445 0.027 207.872);
  --destructive: oklch(0.501 0.145 42.573);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.437 0.03 207.899);
  --chart-1: oklch(0.437 0.03 207.899);
  --chart-2: oklch(0.935 0.007 207.902);
  --chart-3: oklch(0.935 0.007 207.902);
  --chart-4: oklch(0.957 0.005 207.913);
  --chart-5: oklch(0.441 0.034 207.953);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.015 205.467);
  --foreground: oklch(0.993 0.001 207.929);
  --muted: oklch(0.291 0.029 208.194);
  --muted-foreground: oklch(0.807 0.003 207.92);
  --popover: oklch(0.156 0.017 206.82);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.156 0.017 206.82);
  --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.437 0.03 207.899);
  --primary-foreground: oklch(0.928 0.009 207.895);
  --secondary: oklch(0.311 0.016 207.849);
  --secondary-foreground: oklch(0.838 0.016 207.863);
  --accent: oklch(0.311 0.016 207.849);
  --accent-foreground: oklch(0.838 0.016 207.863);
  --destructive: oklch(0.634 0.187 41.937);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.437 0.03 207.899);
  --chart-1: oklch(0.437 0.03 207.899);
  --chart-2: oklch(0.311 0.016 207.849);
  --chart-3: oklch(0.311 0.016 207.849);
  --chart-4: oklch(0.342 0.019 207.852);
  --chart-5: oklch(0.441 0.034 207.953);
}