Near for shadcn/ui

Near is a shadcn/ui theme built around a light blue primary color (#d7e2ea) with light green accents (#e2ead7). The light mode uses a neutral background (#f8fafc). Dark mode keeps the light blue primary (#d7e2ea) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#000000black
Foreground
#000000black
#f6f8f9whitesmoke
Card
#f8fafcghostwhite
#000000black
Card foreground
#000000black
#f6f8f9whitesmoke
Popover
#f8fafcghostwhite
#000000black
Popover foreground
#000000black
#f6f8f9whitesmoke
Primary
#d7e2eagainsboro
#d7e2eagainsboro
Primary foreground
#314a5edarkslategray
#314a5edarkslategray
Secondary
#ead7e2gainsboro
#ead7e2gainsboro
Secondary foreground
#5e314adarkslategray
#5e314adarkslategray
Muted
#eee7eblinen
#181115black
Muted foreground
#594550darkslategray
#baa6b1darkgray
Accent
#e2ead7gainsboro
#e2ead7gainsboro
Accent foreground
#151b0eblack
#151b0eblack
Destructive
#c61815firebrick
#e71c18crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d7e2eagainsboro
#d7e2eagainsboro

Contrast

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

Light mode
Text on background20.08:1AAA
Text on card20.08:1AAA
Primary button7.00:1AAA
Secondary button7.59:1AAA
Muted text7.22:1AAA
Accent14.19:1AAA
Destructive5.90:1AA
Dark mode
Text on background19.71:1AAA
Text on card19.71:1AAA
Primary button7.00:1AAA
Secondary button7.59:1AAA
Muted text8.12:1AAA
Accent14.19:1AAA
Destructive4.59:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.003 240.321);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.935 0.009 342.04);
  --muted-foreground: oklch(0.415 0.033 343.633);
  --popover: oklch(0.984 0.003 240.321);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.984 0.003 240.321);
  --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.906 0.016 240.53);
  --primary-foreground: oklch(0.398 0.045 242.167);
  --secondary: oklch(0.897 0.025 342.468);
  --secondary-foreground: oklch(0.38 0.073 346.06);
  --accent: oklch(0.925 0.027 126.129);
  --accent-foreground: oklch(0.211 0.025 127.455);
  --destructive: oklch(0.528 0.205 28.527);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.906 0.016 240.53);
  --chart-1: oklch(0.906 0.016 240.53);
  --chart-2: oklch(0.897 0.025 342.468);
  --chart-3: oklch(0.925 0.027 126.129);
  --chart-4: oklch(0.923 0.019 342.288);
  --chart-5: oklch(0.906 0.018 240.555);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.977 0.003 240.321);
  --muted: oklch(0.188 0.014 343.474);
  --muted-foreground: oklch(0.745 0.029 342.705);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.977 0.003 240.321);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.977 0.003 240.321);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.906 0.016 240.53);
  --primary-foreground: oklch(0.398 0.045 242.167);
  --secondary: oklch(0.897 0.025 342.468);
  --secondary-foreground: oklch(0.38 0.073 346.06);
  --accent: oklch(0.925 0.027 126.129);
  --accent-foreground: oklch(0.211 0.025 127.455);
  --destructive: oklch(0.591 0.231 28.613);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.906 0.016 240.53);
  --chart-1: oklch(0.906 0.016 240.53);
  --chart-2: oklch(0.897 0.025 342.468);
  --chart-3: oklch(0.925 0.027 126.129);
  --chart-4: oklch(0.923 0.019 342.288);
  --chart-5: oklch(0.906 0.018 240.555);
}