Instructive for shadcn/ui

Instructive is a shadcn/ui theme built around a deep blue primary color (#1d2e63) with deep violet accents (#2e1d63). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the deep blue primary (#1d2e63) on a blue-tinted background (#06080e).

Color palette

TokenLightDark
Background
#fbfcfewhite
#06080eblack
Foreground
#000000black
#ffffffwhite
Card
#f6f8fdghostwhite
#080a12black
Card foreground
#000000black
#ffffffwhite
Popover
#f6f8fdghostwhite
#080a12black
Popover foreground
#000000black
#ffffffwhite
Primary
#1d2e63midnightblue
#1d2e63midnightblue
Primary foreground
#c4ceeelightblue
#c4ceeelightblue
Secondary
#1d5163darkslategray
#1d5163darkslategray
Secondary foreground
#c4e3eepowderblue
#c4e3eepowderblue
Muted
#d7dadbgainsboro
#242728darkslategray
Muted foreground
#4a5559darkslategray
#a6b1b5darkgray
Accent
#2e1d63midnightblue
#2e1d63midnightblue
Accent foreground
#cec4eethistle
#cec4eethistle
Destructive
#6e1102maroon
#eb2305orangered
Destructive foreground
#fdb1a5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1d2e63midnightblue
#1d2e63midnightblue

Contrast

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

Light mode
Text on background20.39:1AAA
Text on card19.80:1AAA
Primary button8.25:1AAA
Secondary button6.44:1AA
Muted text5.44:1AA
Accent8.68:1AAA
Destructive6.89:1AA
Dark mode
Text on background20.00:1AAA
Text on card19.76:1AAA
Primary button8.25:1AAA
Secondary button6.44:1AA
Muted text6.84:1AA
Accent8.68:1AAA
Destructive4.39:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 271.375);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.886 0.003 219.535);
  --muted-foreground: oklch(0.442 0.015 219.823);
  --popover: oklch(0.98 0.007 271.34);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.007 271.34);
  --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.319 0.096 267.007);
  --primary-foreground: oklch(0.854 0.045 270.838);
  --secondary: oklch(0.409 0.062 223.577);
  --secondary-foreground: oklch(0.897 0.036 219.898);
  --accent: oklch(0.298 0.117 288.738);
  --accent-foreground: oklch(0.842 0.059 296.564);
  --destructive: oklch(0.348 0.129 32.017);
  --destructive-foreground: oklch(0.829 0.092 28.895);
  --ring: oklch(0.319 0.096 267.007);
  --chart-1: oklch(0.319 0.096 267.007);
  --chart-2: oklch(0.409 0.062 223.577);
  --chart-3: oklch(0.298 0.117 288.738);
  --chart-4: oklch(0.442 0.068 223.708);
  --chart-5: oklch(0.318 0.101 266.718);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.015 267.425);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.271 0.005 219.64);
  --muted-foreground: oklch(0.753 0.013 219.651);
  --popover: oklch(0.147 0.018 268.886);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.147 0.018 268.886);
  --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.319 0.096 267.007);
  --primary-foreground: oklch(0.854 0.045 270.838);
  --secondary: oklch(0.409 0.062 223.577);
  --secondary-foreground: oklch(0.897 0.036 219.898);
  --accent: oklch(0.298 0.117 288.738);
  --accent-foreground: oklch(0.842 0.059 296.564);
  --destructive: oklch(0.601 0.232 31.018);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.319 0.096 267.007);
  --chart-1: oklch(0.319 0.096 267.007);
  --chart-2: oklch(0.409 0.062 223.577);
  --chart-3: oklch(0.298 0.117 288.738);
  --chart-4: oklch(0.442 0.068 223.708);
  --chart-5: oklch(0.318 0.101 266.718);
}