Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Theme + palette

The visual configuration applied at render time. Theme::light() ships v1; dark + custom themes follow.

Defaults

Theme {
    bg: #ffffff,
    row_alt_bg: Some(#fafafa),
    grid_week: { color: #e5e5e5, width: 1.0 },
    grid_month: { color: #cccccc, width: 2.0 },
    header_bg: #f5f5f5,
    text_primary: #222222,
    text_muted: #888888,
    bar_corner_radius: 6.0,
    bar_height: 28.0,
    row_height: 44.0,
    gutter_width: 180.0,
    header_height: 60.0,
    palette: OwnerPalette::Wong,
}

Wong palette

The default owner-colour palette is Wong's colourblind-friendly 8-colour set:

#ColourHex
0Blue#0072b2
1Vermillion#d55e00
2Bluish green#009e73
3Reddish purple#cc79a7
4Yellow#f0e442
5Sky blue#56b4e9
6Orange#e69f00
7Black#000000

Auto-assignment hashes the owner's name (FNV-1a 64-bit, then modulo). The hash is stable across native + wasm32, so the same fixture renders the same colours in every build.

Contrast-aware bar text

Color::luminance implements the WCAG 2.x relative-luminance formula (sRGB → linear → weighted). contrast_text_color(bg) picks black if bg.luminance() > 0.179 else white. The bar's owner name uses this against the bar's fill.

OwnerPalette variants

pub enum OwnerPalette {
    Wong,                          // default
    Custom(Vec<Color>),            // hash against your own list
    AutoWithOverrides(Vec<Color>), // explicit PersonMap wins; rest hash
}

Override individual owners, keep the default for the rest

The most common case — most owners get auto-assigned, a few get explicit brand colours — uses AutoWithOverrides(WONG-decoded) for the fallback palette and fills PersonMap with the explicit entries.