Nautical for shadcn/ui

Nautical is a shadcn/ui theme built around a muted violet primary color (#6d5e87) with muted light violet accents (#e5e3e8). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted violet primary (#6d5e87) on a violet-tinted background (#090410).

Color palette

TokenLightDark
Background
#fcfbfewhite
#090410black
Foreground
#020104black
#fcfcfdwhite
Card
#f9f7fdghostwhite
#0b0514black
Card foreground
#000000black
#ffffffwhite
Popover
#f9f7fdghostwhite
#0b0514black
Popover foreground
#000000black
#ffffffwhite
Primary
#6d5e87dimgray
#6d5e87dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e5e3e8gainsboro
#19191ablack
Secondary foreground
#4b4653darkslategray
#b2b0b5darkgray
Muted
#d8d7dbgainsboro
#262428darkslategray
Muted foreground
#4e4d51darkslategray
#afaeb2darkgray
Accent
#e5e3e8gainsboro
#19191ablack
Accent foreground
#4b4653darkslategray
#b2b0b5darkgray
Destructive
#7b2209maroon
#ef542atomato
Destructive foreground
#facabdpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6d5e87dimgray
#6d5e87dimgray

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card19.70:1AAA
Primary button5.81:1AA
Secondary button7.18:1AAA
Muted text5.84:1AA
Accent7.18:1AAA
Destructive6.85:1AA
Dark mode
Text on background19.73:1AAA
Text on card20.04:1AAA
Primary button5.81:1AA
Secondary button8.18:1AAA
Muted text6.95:1AA
Accent8.18:1AAA
Destructive3.51:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 302.86);
  --foreground: oklch(0.081 0.015 303.636);
  --muted: oklch(0.881 0.005 302.835);
  --muted-foreground: oklch(0.422 0.008 302.638);
  --popover: oklch(0.979 0.009 302.789);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.009 302.789);
  --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.513 0.066 300.911);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.92 0.006 302.834);
  --secondary-foreground: oklch(0.405 0.021 302.136);
  --accent: oklch(0.92 0.006 302.834);
  --accent-foreground: oklch(0.405 0.021 302.136);
  --destructive: oklch(0.392 0.128 35.181);
  --destructive-foreground: oklch(0.877 0.058 35.968);
  --ring: oklch(0.513 0.066 300.911);
  --chart-1: oklch(0.513 0.066 300.911);
  --chart-2: oklch(0.92 0.006 302.834);
  --chart-3: oklch(0.92 0.006 302.834);
  --chart-4: oklch(0.944 0.004 302.865);
  --chart-5: oklch(0.507 0.077 300.522);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.029 302.196);
  --foreground: oklch(0.992 0.001 302.917);
  --muted: oklch(0.265 0.007 302.509);
  --muted-foreground: oklch(0.752 0.007 302.788);
  --popover: oklch(0.137 0.034 300.503);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.137 0.034 300.503);
  --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.513 0.066 300.911);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.214 0.003 302.709);
  --secondary-foreground: oklch(0.761 0.007 302.794);
  --accent: oklch(0.214 0.003 302.709);
  --accent-foreground: oklch(0.761 0.007 302.794);
  --destructive: oklch(0.651 0.198 35.733);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.513 0.066 300.911);
  --chart-1: oklch(0.513 0.066 300.911);
  --chart-2: oklch(0.214 0.003 302.709);
  --chart-3: oklch(0.214 0.003 302.709);
  --chart-4: oklch(0.246 0.004 302.689);
  --chart-5: oklch(0.507 0.077 300.522);
}