Oxford for shadcn/ui

Oxford is a shadcn/ui theme built around a vivid yellow primary color (#9c6f07) with vivid violet accents (#6f079c). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid yellow primary (#9c6f07) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#9c6f07olive
#9c6f07olive
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#079c6fdarkcyan
#079c6fdarkcyan
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d3dedbgainsboro
#212c28darkslategray
Muted foreground
#596964dimgray
#96a6a1darkgray
Accent
#6f079cdarkmagenta
#6f079cdarkmagenta
Accent foreground
#f2d8fdlavender
#f2d8fdlavender
Destructive
#6d1803maroon
#f23607orangered
Destructive foreground
#fcb7a6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9c6f07olive
#9c6f07olive

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button4.46:1AA Large
Secondary button3.50:1AA Large
Muted text4.20:1AA Large
Accent7.31:1AAA
Destructive6.98:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button4.46:1AA Large
Secondary button3.50:1AA Large
Muted text5.70:1AA
Accent7.31:1AAA
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.892 0.012 176.252);
  --muted-foreground: oklch(0.505 0.02 175.444);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.573 0.117 80.223);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.614 0.129 164.195);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.418 0.206 310.903);
  --accent-foreground: oklch(0.915 0.057 315.8);
  --destructive: oklch(0.354 0.121 34.446);
  --destructive-foreground: oklch(0.84 0.084 34.527);
  --ring: oklch(0.573 0.117 80.223);
  --chart-1: oklch(0.573 0.117 80.223);
  --chart-2: oklch(0.614 0.129 164.195);
  --chart-3: oklch(0.418 0.206 310.903);
  --chart-4: oklch(0.655 0.138 164.054);
  --chart-5: oklch(0.578 0.119 79.742);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.28 0.016 174.887);
  --muted-foreground: oklch(0.711 0.019 175.873);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.573 0.117 80.223);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.614 0.129 164.195);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.418 0.206 310.903);
  --accent-foreground: oklch(0.915 0.057 315.8);
  --destructive: oklch(0.627 0.227 33.096);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.573 0.117 80.223);
  --chart-1: oklch(0.573 0.117 80.223);
  --chart-2: oklch(0.614 0.129 164.195);
  --chart-3: oklch(0.418 0.206 310.903);
  --chart-4: oklch(0.655 0.138 164.054);
  --chart-5: oklch(0.578 0.119 79.742);
}