Nut for shadcn/ui

Nut is a shadcn/ui theme built around a cyan primary color (#47838a) with blue accents (#47628a). The light mode uses a neutral background (#f8fcfc). Dark mode keeps the cyan primary (#47838a) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#f8fcfcmintcream
#010304black
Foreground
#020809black
#fcfdfdwhite
Card
#f4fafamintcream
#030707black
Card foreground
#010404black
#ffffffwhite
Popover
#f4fafamintcream
#030707black
Popover foreground
#010404black
#ffffffwhite
Primary
#47838aslategray
#47838aslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#478a6fseagreen
#478a6fseagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dceae4gainsboro
#15231dblack
Muted foreground
#546d63dimgray
#92aba1darkgray
Accent
#47628adarkslateblue
#47628adarkslateblue
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ce4a0dchocolate
#f16727chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#47838aslategray
#47838aslategray

Contrast

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

Light mode
Text on background19.45:1AAA
Text on card19.49:1AAA
Primary button4.28:1AA Large
Secondary button4.08:1AA Large
Muted text4.51:1AA
Accent6.21:1AA
Destructive4.54:1AA
Dark mode
Text on background20.23:1AAA
Text on card20.24:1AAA
Primary button4.28:1AA Large
Secondary button4.08:1AA Large
Muted text6.64:1AA
Accent6.21:1AA
Destructive6.72:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.004 204.958);
  --foreground: oklch(0.124 0.016 201.863);
  --muted: oklch(0.924 0.016 170.12);
  --muted-foreground: oklch(0.513 0.034 168.585);
  --popover: oklch(0.981 0.006 204.943);
  --popover-foreground: oklch(0.099 0.012 201.863);
  --card: oklch(0.981 0.006 204.943);
  --card-foreground: oklch(0.099 0.012 201.863);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.573 0.063 204.882);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.581 0.081 165.588);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.492 0.072 258.288);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.585 0.178 39.96);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.573 0.063 204.882);
  --chart-1: oklch(0.573 0.063 204.882);
  --chart-2: oklch(0.581 0.081 165.588);
  --chart-3: oklch(0.492 0.072 258.288);
  --chart-4: oklch(0.612 0.086 165.547);
  --chart-5: oklch(0.579 0.068 204.966);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.009 202.701);
  --foreground: oklch(0.993 0.001 204.98);
  --muted: oklch(0.241 0.021 167.755);
  --muted-foreground: oklch(0.718 0.031 169.308);
  --popover: oklch(0.122 0.011 202.701);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.011 202.701);
  --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.573 0.063 204.882);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.581 0.081 165.588);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.492 0.072 258.288);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.678 0.185 42.107);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.573 0.063 204.882);
  --chart-1: oklch(0.573 0.063 204.882);
  --chart-2: oklch(0.581 0.081 165.588);
  --chart-3: oklch(0.492 0.072 258.288);
  --chart-4: oklch(0.612 0.086 165.547);
  --chart-5: oklch(0.579 0.068 204.966);
}