Nautical for shadcn/ui

Nautical is a shadcn/ui theme built around a violet primary color (#7838b7) with teal accents (#38b778). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#7838b7) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#ffffffwhite
#030203black
Foreground
#000000black
#ffffffwhite
Card
#ffffffwhite
#030203black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#030203black
Popover foreground
#000000black
#ffffffwhite
Primary
#7838b7rebeccapurple
#7838b7rebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#b77838peru
#b77838peru
Secondary foreground
#000000black
#000000black
Muted
#f1edealinen
#15120eblack
Muted foreground
#4c4238darkslategray
#c7bdb3silver
Accent
#38b778mediumseagreen
#38b778mediumseagreen
Accent foreground
#081b12black
#081b12black
Destructive
#810303maroon
#fa3838tomato
Destructive foreground
#fdb9b9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7838b7rebeccapurple
#7838b7rebeccapurple

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 button6.87:1AA
Secondary button5.75:1AA
Muted text8.41:1AAA
Accent7.01:1AAA
Destructive6.56:1AA
Dark mode
Text on background20.75:1AAA
Text on card20.75:1AAA
Primary button6.87:1AA
Secondary button5.75:1AA
Muted text10.10:1AAA
Accent7.01:1AAA
Destructive3.69:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.948 0.006 67.754);
  --muted-foreground: oklch(0.387 0.021 67.128);
  --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.491 0.191 302.791);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.627 0.112 63.063);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.696 0.145 156.99);
  --accent-foreground: oklch(0.204 0.032 160.038);
  --destructive: oklch(0.381 0.154 28.868);
  --destructive-foreground: oklch(0.849 0.079 18.836);
  --ring: oklch(0.491 0.191 302.791);
  --chart-1: oklch(0.491 0.191 302.791);
  --chart-2: oklch(0.627 0.112 63.063);
  --chart-3: oklch(0.696 0.145 156.99);
  --chart-4: oklch(0.656 0.118 63.009);
  --chart-5: oklch(0.49 0.199 302.322);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.011 309.429);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.184 0.009 67.239);
  --muted-foreground: oklch(0.803 0.018 67.57);
  --popover: oklch(0.085 0.011 309.429);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.085 0.011 309.429);
  --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.491 0.191 302.791);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.627 0.112 63.063);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.696 0.145 156.99);
  --accent-foreground: oklch(0.204 0.032 160.038);
  --destructive: oklch(0.644 0.229 26.514);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.491 0.191 302.791);
  --chart-1: oklch(0.491 0.191 302.791);
  --chart-2: oklch(0.627 0.112 63.063);
  --chart-3: oklch(0.696 0.145 156.99);
  --chart-4: oklch(0.656 0.118 63.009);
  --chart-5: oklch(0.49 0.199 302.322);
}