Nosy Royal for shadcn/ui

Nosy Royal is a shadcn/ui theme built around a vivid deep blue primary color (#001694) with vivid deep yellow accents (#947e00). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the vivid deep blue primary (#001694) on a blue-tinted background (#05060a).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#05060ablack
Foreground
#020308black
#ffffffwhite
Card
#f5f6fawhitesmoke
#07080dblack
Card foreground
#010104black
#ffffffwhite
Popover
#f5f6fawhitesmoke
#07080dblack
Popover foreground
#010104black
#ffffffwhite
Primary
#001694darkblue
#001694darkblue
Primary foreground
#c7cffflightblue
#c7cffflightblue
Secondary
#947e00olive
#947e00olive
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#edece8linen
#171612black
Muted foreground
#716d56dimgray
#a9a58edarkgray
Accent
#947e00olive
#947e00olive
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#8e1a06darkred
#eb2c0aorangered
Destructive foreground
#fdd1c9pink
#ffffffwhite
Border
#dfe0e7gainsboro
#16171dblack
Input
#dfe0e7gainsboro
#16171dblack
Ring
#001694darkblue
#001694darkblue

Contrast

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

Light mode
Text on background19.54:1AAA
Text on card19.25:1AAA
Primary button8.94:1AAA
Secondary button4.01:1AA Large
Muted text4.42:1AA Large
Accent4.01:1AA Large
Destructive6.57:1AA
Dark mode
Text on background20.24:1AAA
Text on card20.00:1AAA
Primary button8.94:1AAA
Secondary button4.01:1AA Large
Muted text7.29:1AAA
Accent4.01:1AA Large
Destructive4.29:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 278.263);
  --foreground: oklch(0.099 0.019 270.946);
  --muted: oklch(0.943 0.006 98.401);
  --muted-foreground: oklch(0.533 0.036 99.134);
  --popover: oklch(0.973 0.006 278.235);
  --popover-foreground: oklch(0.078 0.015 270.946);
  --card: oklch(0.973 0.006 278.235);
  --card-foreground: oklch(0.078 0.015 270.946);
  --border: oklch(0.908 0.009 278.171);
  --input: oklch(0.908 0.009 278.171);
  --primary: oklch(0.32 0.196 264.173);
  --primary-foreground: oklch(0.865 0.067 277.074);
  --secondary: oklch(0.595 0.123 96.669);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.595 0.123 96.669);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.42 0.153 32.04);
  --destructive-foreground: oklch(0.896 0.051 29.776);
  --ring: oklch(0.32 0.196 264.173);
  --chart-1: oklch(0.32 0.196 264.173);
  --chart-2: oklch(0.595 0.123 96.669);
  --chart-3: oklch(0.595 0.123 96.669);
  --chart-4: oklch(0.639 0.132 96.542);
  --chart-5: oklch(0.32 0.2 263.769);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.011 275.288);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.2 0.008 98.85);
  --muted-foreground: oklch(0.72 0.034 98.918);
  --popover: oklch(0.136 0.012 275.667);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.136 0.012 275.667);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.206 0.012 277.394);
  --input: oklch(0.206 0.012 277.394);
  --primary: oklch(0.32 0.196 264.173);
  --primary-foreground: oklch(0.865 0.067 277.074);
  --secondary: oklch(0.595 0.123 96.669);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.595 0.123 96.669);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.606 0.227 31.626);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.32 0.196 264.173);
  --chart-1: oklch(0.32 0.196 264.173);
  --chart-2: oklch(0.595 0.123 96.669);
  --chart-3: oklch(0.595 0.123 96.669);
  --chart-4: oklch(0.639 0.132 96.542);
  --chart-5: oklch(0.32 0.2 263.769);
}