Django Spellbook includes nine color presets. Pick one in your settings and every SpellBlock, sidebar, and utility class adapts automatically.
Using a Preset
# settings.py
SPELLBOOK_THEME = 'arcane'
That's it. Run python manage.py spellbook_md and your content renders with the new colors.
Available Presets
default
Blue and gray. Professional, readable, familiar.
SPELLBOOK_THEME = 'default'
The classic Spellbook look. Blue primary actions, amber accents, gray supporting elements. Works everywhere.
arcane
Purple and gold. Mysterious, magical, dramatic.
SPELLBOOK_THEME = 'arcane'
Deep violet primary with golden spell glows. For documentation that feels like a grimoire.
celestial
Sky blue and gold. Light, airy, divine.
SPELLBOOK_THEME = 'celestial'
Heavenly blues with sacred gold accents. Clean and uplifting.
forest
Green and brown. Natural, grounded, earthy.
SPELLBOOK_THEME = 'forest'
Deep forest greens with autumn orange accents. Organic and calm.
ocean
Blue and cyan. Deep, fluid, aquatic.
SPELLBOOK_THEME = 'ocean'
Ocean depths and coastal teals. Cool and refreshing.
phoenix
Red and orange. Fiery, bold, energetic.
SPELLBOOK_THEME = 'phoenix'
Flame reds with ember orange. For content that demands attention.
shadow
Monochrome grays. Dark, minimal, focused.
SPELLBOOK_THEME = 'shadow'
Pure grayscale palette. No color distraction, maximum readability.
enchanted
Pink and gold. Magical, whimsical, vibrant.
SPELLBOOK_THEME = 'enchanted'
Bright magical pinks with fairy gold. Playful and memorable.
pastel
Soft violet and amber. Gentle, soft, approachable.
SPELLBOOK_THEME = 'pastel'
Darker pastels that meet accessibility standards while staying soft. Easy on the eyes.
Quick Customization
Override specific colors while keeping the rest of a preset:
SPELLBOOK_THEME = {
'preset': 'ocean',
'colors': {
'primary': '#0EA5E9',
'accent': '#F59E0B',
}
}
This starts with the ocean preset and replaces just the primary and accent colors.
Custom Colors
Define your own palette from scratch:
SPELLBOOK_THEME = {
'name': 'corporate',
'colors': {
'primary': '#1E40AF',
'secondary': '#64748B',
'accent': '#F59E0B',
}
}
Undefined colors fall back to the default theme values.
Color Categories
Each theme defines colors in four groups:
Core - Your brand identity
-
primary- Main action color (buttons, links, active states) -
secondary- Supporting color (borders, muted elements) -
accent- Highlight color (calls to action, badges) -
neutral- Background elements
Status - User feedback
-
success- Positive outcomes -
warning- Caution states -
error- Problems and failures -
info- Informational messages
Specialty - Extended palette
-
emphasis- Strong highlights -
subtle- Soft backgrounds -
distinct- Differentiation -
aether,artifact,sylvan,danger- Theme-specific accents
System - Page structure
-
background- Page background -
surface- Card and panel backgrounds -
text- Primary text color -
text-secondary- Muted text
Accessibility
All presets are WCAG AA compliant with a minimum 4.5:1 contrast ratio. The colors were specifically chosen to be readable while maintaining their visual character.