Norm for shadcn/ui

Norm is a shadcn/ui theme built around a green primary color (#626930) with neutral gray accents (#dfdfdd). The light mode uses a neutral background (#fbfbf8). Dark mode keeps the green primary (#626930) on a green-tinted background (#0a0a05).

Color palette

TokenLightDark
Background
#fbfbf8snow
#0a0a05black
Foreground
#040401black
#f9f9f5whitesmoke
Card
#f9faf5whitesmoke
#0d0d07black
Card foreground
#000000black
#fbfbf9snow
Popover
#f9faf5whitesmoke
#0d0d07black
Popover foreground
#000000black
#fbfbf9snow
Primary
#626930darkolivegreen
#626930darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dfdfddgainsboro
#2c2c2adarkslategray
Secondary foreground
#474842darkslategray
#c5c6c3silver
Muted
#f2f2edwhitesmoke
#11120dblack
Muted foreground
#616354dimgray
#a9ab9cdarkgray
Accent
#dfdfddgainsboro
#2c2c2adarkslategray
Accent foreground
#474842darkslategray
#c5c6c3silver
Destructive
#a53212brown
#eb6b47tomato
Destructive foreground
#fdf0edseashell
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#626930darkolivegreen
#626930darkolivegreen

Contrast

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

Light mode
Text on background19.86:1AAA
Text on card19.99:1AAA
Primary button5.87:1AA
Secondary button6.92:1AA
Muted text5.47:1AA
Accent6.92:1AA
Destructive6.13:1AA
Dark mode
Text on background18.79:1AAA
Text on card18.77:1AAA
Primary button5.87:1AA
Secondary button8.13:1AAA
Muted text8.05:1AAA
Accent8.13:1AAA
Destructive6.70:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.004 111.859);
  --foreground: oklch(0.105 0.016 113.121);
  --muted: oklch(0.96 0.007 111.915);
  --muted-foreground: oklch(0.494 0.023 112.636);
  --popover: oklch(0.983 0.006 111.899);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.006 111.899);
  --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.501 0.08 114.828);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.903 0.004 111.854);
  --secondary-foreground: oklch(0.398 0.009 112.207);
  --accent: oklch(0.903 0.004 111.854);
  --accent-foreground: oklch(0.398 0.009 112.207);
  --destructive: oklch(0.487 0.156 35.318);
  --destructive-foreground: oklch(0.965 0.015 35.968);
  --ring: oklch(0.501 0.08 114.828);
  --chart-1: oklch(0.501 0.08 114.828);
  --chart-2: oklch(0.903 0.004 111.854);
  --chart-3: oklch(0.903 0.004 111.854);
  --chart-4: oklch(0.926 0.003 111.835);
  --chart-5: oklch(0.508 0.085 115.006);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.012 112.543);
  --foreground: oklch(0.982 0.005 111.884);
  --muted: oklch(0.179 0.01 112.852);
  --muted-foreground: oklch(0.734 0.021 112.307);
  --popover: oklch(0.158 0.014 113.145);
  --popover-foreground: oklch(0.988 0.004 111.849);
  --card: oklch(0.158 0.014 113.145);
  --card-foreground: oklch(0.988 0.004 111.849);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.501 0.08 114.828);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.293 0.003 111.978);
  --secondary-foreground: oklch(0.824 0.003 111.853);
  --accent: oklch(0.293 0.003 111.978);
  --accent-foreground: oklch(0.824 0.003 111.853);
  --destructive: oklch(0.676 0.167 36.35);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.501 0.08 114.828);
  --chart-1: oklch(0.501 0.08 114.828);
  --chart-2: oklch(0.293 0.003 111.978);
  --chart-3: oklch(0.293 0.003 111.978);
  --chart-4: oklch(0.324 0.004 111.985);
  --chart-5: oklch(0.508 0.085 115.006);
}