Near for shadcn/ui

Near is a shadcn/ui theme built around a light teal primary color (#f4fafb) with muted light teal accents (#bdcfd0). The light mode uses a neutral background (#fbfefe). Dark mode keeps the light teal primary (#f4fafb) on a neutral background (#020303).

Color palette

TokenLightDark
Background
#fbfefewhite
#020303black
Foreground
#020d0dblack
#f8fbfbghostwhite
Card
#fbfefewhite
#020303black
Card foreground
#020d0dblack
#f8fbfbghostwhite
Popover
#fbfefewhite
#020303black
Popover foreground
#020d0dblack
#f8fbfbghostwhite
Primary
#f4fafbmintcream
#f4fafbmintcream
Primary foreground
#183d3fdarkslategray
#183d3fdarkslategray
Secondary
#d2dadbgainsboro
#2a2c2cdarkslategray
Secondary foreground
#364344darkslategray
#c3c5c6silver
Muted
#e9ecedlavender
#121616black
Muted foreground
#45494adarkslategray
#b5babasilver
Accent
#bdcfd0lightsteelblue
#40494adarkslategray
Accent foreground
#263536darkslategray
#dce0e0gainsboro
Destructive
#631e03maroon
#f94b06orangered
Destructive foreground
#fcb79cburlywood
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f4fafbmintcream
#f4fafbmintcream

Contrast

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

Light mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button11.22:1AAA
Secondary button7.24:1AAA
Muted text7.68:1AAA
Accent7.93:1AAA
Destructive7.19:1AAA
Dark mode
Text on background19.82:1AAA
Text on card19.82:1AAA
Primary button11.22:1AAA
Secondary button8.08:1AAA
Muted text9.26:1AAA
Accent6.93:1AA
Destructive3.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 200.855);
  --foreground: oklch(0.146 0.02 198.769);
  --muted: oklch(0.942 0.004 200.835);
  --muted-foreground: oklch(0.403 0.005 200.729);
  --popover: oklch(0.994 0.003 200.855);
  --popover-foreground: oklch(0.146 0.02 198.769);
  --card: oklch(0.994 0.003 200.855);
  --card-foreground: oklch(0.146 0.02 198.769);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.982 0.007 200.803);
  --primary-foreground: oklch(0.334 0.042 199.991);
  --secondary: oklch(0.883 0.009 200.762);
  --secondary-foreground: oklch(0.373 0.017 200.396);
  --accent: oklch(0.843 0.02 200.616);
  --accent-foreground: oklch(0.316 0.02 200.241);
  --destructive: oklch(0.342 0.106 39.087);
  --destructive-foreground: oklch(0.838 0.09 42.483);
  --ring: oklch(0.982 0.007 200.803);
  --chart-1: oklch(0.982 0.007 200.803);
  --chart-2: oklch(0.883 0.009 200.762);
  --chart-3: oklch(0.843 0.02 200.616);
  --chart-4: oklch(0.905 0.007 200.789);
  --chart-5: oklch(0.982 0.007 200.798);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.006 199.514);
  --foreground: oklch(0.987 0.003 200.85);
  --muted: oklch(0.197 0.006 200.539);
  --muted-foreground: oklch(0.784 0.005 200.818);
  --popover: oklch(0.096 0.006 199.514);
  --popover-foreground: oklch(0.987 0.003 200.85);
  --card: oklch(0.096 0.006 199.514);
  --card-foreground: oklch(0.987 0.003 200.85);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.982 0.007 200.803);
  --primary-foreground: oklch(0.334 0.042 199.991);
  --secondary: oklch(0.292 0.002 200.791);
  --secondary-foreground: oklch(0.823 0.002 200.853);
  --accent: oklch(0.398 0.012 200.545);
  --accent-foreground: oklch(0.903 0.005 200.825);
  --destructive: oklch(0.655 0.219 36.659);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.982 0.007 200.803);
  --chart-1: oklch(0.982 0.007 200.803);
  --chart-2: oklch(0.292 0.002 200.791);
  --chart-3: oklch(0.398 0.012 200.545);
  --chart-4: oklch(0.323 0.003 200.787);
  --chart-5: oklch(0.982 0.007 200.798);
}