makeover 5.12.0

Shared theme loading for the make-family apps: TOML theme files parsed into intent-based color tokens, with perceptual derivations and WCAG contrast.
Documentation
//! Theme sources the tests of several modules share.

use crate::{ThemeColors, ThemeDirs, ThemeId, bundled_themes_dir, load_theme};

/// The shipped themes, as the search path a consumer hands the loader.
pub(crate) fn shipped() -> ThemeDirs {
    ThemeDirs::new().bundled(Some(
        bundled_themes_dir().expect("makeover ships its themes"),
    ))
}

pub(crate) fn bundled(id: &str) -> ThemeColors {
    load_theme(&shipped(), &ThemeId::new(id).expect("a theme id")).expect("the akari pair ships")
}

pub(crate) fn nord_toml() -> &'static str {
    r##"
[meta]
name = "Nord"
variant = "dark"

[surface]
page = "#2e3440"
raised = "#3b4252"
sunken = "#434c5e"
overlay = "#3b4252"

[content]
primary = "#d8dee9"
secondary = "#e5e9f0"
muted = "#616e88"

[action]
primary = "#81a1c1"

[status]
danger = "#bf616a"
success = "#a3be8c"
warning = "#ebcb8b"
info = "#88c0d0"

[line]
border = "#4c566a"

[category]
one = "#bf616a"
two = "#a3be8c"
three = "#81a1c1"
four = "#ebcb8b"
five = "#b48ead"
six = "#88c0d0"
"##
}