Near for shadcn/ui

Near is a shadcn/ui theme built around a vivid deep pink primary color (#7f053a) with vivid deep blue accents (#053a7f). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the vivid deep pink primary (#7f053a) on a neutral background (#040102).

Color palette

TokenLightDark
Background
#fdfcfcsnow
#040102black
Foreground
#0c0307black
#fdfcfcsnow
Card
#fdfcfcsnow
#040102black
Card foreground
#0c0307black
#fdfcfcsnow
Popover
#fdfcfcsnow
#040102black
Popover foreground
#0c0307black
#fdfcfcsnow
Primary
#7f053abrown
#7f053abrown
Primary foreground
#fcbad7pink
#fcbad7pink
Secondary
#3a7f05forestgreen
#3a7f05forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ecf4e6beige
#11190bblack
Muted foreground
#4b5841darkolivegreen
#b1bea7darkgray
Accent
#053a7fmidnightblue
#053a7fmidnightblue
Accent foreground
#bad7fclightblue
#bad7fclightblue
Destructive
#791006maroon
#f33220orangered
Destructive foreground
#fbbcb6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7f053abrown
#7f053abrown

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button6.60:1AA
Secondary button4.95:1AA
Muted text6.73:1AA
Accent7.38:1AAA
Destructive6.85:1AA
Dark mode
Text on background20.27:1AAA
Text on card20.27:1AAA
Primary button6.60:1AA
Secondary button4.95:1AA
Muted text9.26:1AAA
Accent7.38:1AAA
Destructive3.96: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.991 0.002 348.792);
  --foreground: oklch(0.121 0.024 348.713);
  --muted: oklch(0.957 0.02 131.266);
  --muted-foreground: oklch(0.442 0.04 131.927);
  --popover: oklch(0.991 0.002 348.792);
  --popover-foreground: oklch(0.121 0.024 348.713);
  --card: oklch(0.991 0.002 348.792);
  --card-foreground: oklch(0.121 0.024 348.713);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.387 0.152 4.432);
  --primary-foreground: oklch(0.859 0.084 351.279);
  --secondary: oklch(0.531 0.158 136.648);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.363 0.128 258.055);
  --accent-foreground: oklch(0.87 0.06 255.226);
  --destructive: oklch(0.371 0.14 30.176);
  --destructive-foreground: oklch(0.851 0.074 24.64);
  --ring: oklch(0.387 0.152 4.432);
  --chart-1: oklch(0.387 0.152 4.432);
  --chart-2: oklch(0.531 0.158 136.648);
  --chart-3: oklch(0.363 0.128 258.055);
  --chart-4: oklch(0.575 0.171 136.768);
  --chart-5: oklch(0.39 0.154 4.981);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.014 348.432);
  --foreground: oklch(0.992 0.002 348.783);
  --muted: oklch(0.199 0.028 132.503);
  --muted-foreground: oklch(0.785 0.035 131.483);
  --popover: oklch(0.085 0.014 348.432);
  --popover-foreground: oklch(0.992 0.002 348.783);
  --card: oklch(0.085 0.014 348.432);
  --card-foreground: oklch(0.992 0.002 348.783);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.387 0.152 4.432);
  --primary-foreground: oklch(0.859 0.084 351.279);
  --secondary: oklch(0.531 0.158 136.648);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.363 0.128 258.055);
  --accent-foreground: oklch(0.87 0.06 255.226);
  --destructive: oklch(0.626 0.229 29.984);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.387 0.152 4.432);
  --chart-1: oklch(0.387 0.152 4.432);
  --chart-2: oklch(0.531 0.158 136.648);
  --chart-3: oklch(0.363 0.128 258.055);
  --chart-4: oklch(0.575 0.171 136.768);
  --chart-5: oklch(0.39 0.154 4.981);
}