Narrow for shadcn/ui

Narrow is a shadcn/ui theme built around a vivid light violet primary color (#cbb4f9) with vivid light green accents (#b4f9cb). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light violet primary (#cbb4f9) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#ffffffwhite
#040307black
Foreground
#000000black
#f6f4fawhitesmoke
Card
#ffffffwhite
#040307black
Card foreground
#000000black
#f6f4fawhitesmoke
Popover
#ffffffwhite
#040307black
Popover foreground
#000000black
#f6f4fawhitesmoke
Primary
#cbb4f9thistle
#cbb4f9thistle
Primary foreground
#2c0971midnightblue
#2c0971midnightblue
Secondary
#f9cbb4peachpuff
#f9cbb4peachpuff
Secondary foreground
#712c09saddlebrown
#712c09saddlebrown
Muted
#e2d9d5gainsboro
#2a211dblack
Muted foreground
#4c3f38darkslategray
#c7b9b3silver
Accent
#b4f9cbpowderblue
#b4f9cbpowderblue
Accent foreground
#021307black
#021307black
Destructive
#7f2e0bsaddlebrown
#eb5b1echocolate
Destructive foreground
#fad3c2peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cbb4f9thistle
#cbb4f9thistle

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button8.22:1AAA
Secondary button6.86:1AA
Muted text7.28:1AAA
Accent15.76:1AAA
Destructive6.62:1AA
Dark mode
Text on background18.83:1AAA
Text on card18.83:1AAA
Primary button8.22:1AAA
Secondary button6.86:1AA
Muted text8.21:1AAA
Accent15.76:1AAA
Destructive3.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.891 0.012 48.592);
  --muted-foreground: oklch(0.379 0.022 48.129);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.812 0.099 299.487);
  --primary-foreground: oklch(0.288 0.155 286.505);
  --secondary: oklch(0.875 0.061 48);
  --secondary-foreground: oklch(0.387 0.107 42.755);
  --accent: oklch(0.923 0.094 154.986);
  --accent-foreground: oklch(0.165 0.037 154.837);
  --destructive: oklch(0.414 0.12 40.247);
  --destructive-foreground: oklch(0.895 0.05 44.508);
  --ring: oklch(0.812 0.099 299.487);
  --chart-1: oklch(0.812 0.099 299.487);
  --chart-2: oklch(0.875 0.061 48);
  --chart-3: oklch(0.923 0.094 154.986);
  --chart-4: oklch(0.898 0.049 48.149);
  --chart-5: oklch(0.81 0.102 299.407);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.104 0.016 301.876);
  --foreground: oklch(0.971 0.008 301.354);
  --muted: oklch(0.259 0.016 48.071);
  --muted-foreground: oklch(0.796 0.018 48.488);
  --popover: oklch(0.104 0.016 301.876);
  --popover-foreground: oklch(0.971 0.008 301.354);
  --card: oklch(0.104 0.016 301.876);
  --card-foreground: oklch(0.971 0.008 301.354);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.812 0.099 299.487);
  --primary-foreground: oklch(0.288 0.155 286.505);
  --secondary: oklch(0.875 0.061 48);
  --secondary-foreground: oklch(0.387 0.107 42.755);
  --accent: oklch(0.923 0.094 154.986);
  --accent-foreground: oklch(0.165 0.037 154.837);
  --destructive: oklch(0.653 0.191 40.195);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.812 0.099 299.487);
  --chart-1: oklch(0.812 0.099 299.487);
  --chart-2: oklch(0.875 0.061 48);
  --chart-3: oklch(0.923 0.094 154.986);
  --chart-4: oklch(0.898 0.049 48.149);
  --chart-5: oklch(0.81 0.102 299.407);
}