Learning for shadcn/ui

Learning is a shadcn/ui theme built around a light violet primary color (#d5b6ec) with muted light violet accents (#e3e1e5). The light mode uses a neutral background (#ffffff). Dark mode keeps the light violet primary (#d5b6ec) on a violet-tinted background (#08040c).

Color palette

TokenLightDark
Background
#ffffffwhite
#08040cblack
Foreground
#050208black
#faf9fbghostwhite
Card
#fcfcfcsnow
#0b0510black
Card foreground
#030104black
#fdfcfdwhite
Popover
#fcfcfcsnow
#0b0510black
Popover foreground
#030104black
#fdfcfdwhite
Primary
#d5b6ecthistle
#d5b6ecthistle
Primary foreground
#3d1759midnightblue
#3d1759midnightblue
Secondary
#e3e1e5gainsboro
#342e38darkslategray
Secondary foreground
#4b4450darkslategray
#cdc7d1lightgrey
Muted
#e1dde3gainsboro
#1f1c22black
Muted foreground
#493f50darkslategray
#b9afc0silver
Accent
#e3e1e5gainsboro
#342e38darkslategray
Accent foreground
#4b4450darkslategray
#cdc7d1lightgrey
Destructive
#a1360csaddlebrown
#ef612achocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d5b6ecthistle
#d5b6ecthistle

Contrast

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

Light mode
Text on background20.61:1AAA
Text on card20.34:1AAA
Primary button8.00:1AAA
Secondary button7.20:1AAA
Muted text7.43:1AAA
Accent7.20:1AAA
Destructive6.86:1AA
Dark mode
Text on background19.39:1AAA
Text on card19.68:1AAA
Primary button8.00:1AAA
Secondary button7.97:1AAA
Muted text8.01:1AAA
Accent7.97:1AAA
Destructive6.42:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.104 0.022 312.791);
  --muted: oklch(0.903 0.009 310.997);
  --muted-foreground: oklch(0.384 0.031 310.379);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.082 0.017 312.791);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.082 0.017 312.791);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.821 0.081 310.221);
  --primary-foreground: oklch(0.299 0.115 306.632);
  --secondary: oklch(0.912 0.007 311.021);
  --secondary-foreground: oklch(0.398 0.021 310.618);
  --accent: oklch(0.912 0.007 311.021);
  --accent-foreground: oklch(0.398 0.021 310.618);
  --destructive: oklch(0.485 0.15 38.518);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.821 0.081 310.221);
  --chart-1: oklch(0.821 0.081 310.221);
  --chart-2: oklch(0.912 0.007 311.021);
  --chart-3: oklch(0.912 0.007 311.021);
  --chart-4: oklch(0.936 0.005 311.04);
  --chart-5: oklch(0.819 0.086 310.174);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.024 312.514);
  --foreground: oklch(0.983 0.003 311.061);
  --muted: oklch(0.231 0.013 310.609);
  --muted-foreground: oklch(0.767 0.026 310.787);
  --popover: oklch(0.132 0.027 311.019);
  --popover-foreground: oklch(0.992 0.001 311.073);
  --card: oklch(0.132 0.027 311.019);
  --card-foreground: oklch(0.992 0.001 311.073);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.821 0.081 310.221);
  --primary-foreground: oklch(0.299 0.115 306.632);
  --secondary: oklch(0.311 0.02 310.538);
  --secondary-foreground: oklch(0.837 0.015 310.925);
  --accent: oklch(0.311 0.02 310.538);
  --accent-foreground: oklch(0.837 0.015 310.925);
  --destructive: oklch(0.667 0.187 39.912);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.821 0.081 310.221);
  --chart-1: oklch(0.821 0.081 310.221);
  --chart-2: oklch(0.311 0.02 310.538);
  --chart-3: oklch(0.311 0.02 310.538);
  --chart-4: oklch(0.34 0.022 310.522);
  --chart-5: oklch(0.819 0.086 310.174);
}