structboost.palette_audit¶
- structboost.palette_audit(palette)[source]¶
Measured separation and contrast for a palette, so a choice can be checked.
Reports the minimum pairwise OKLab distance under normal vision and under simulated deuteranopia / protanopia / tritanopia (Machado et al. 2009), plus the worst WCAG contrast against white. Targets are 15 dE, 8 dE and 3.0; a palette failing them is not unusable, but colour is then a supporting encoding rather than the identity channel.
- Parameters:
palette – A key of the built-in palettes (
"tab5","tab10","scanpy20","safe") or a sequence of hex colours.- Returns:
dict –
n,min_de_normal,min_de_cvd,min_contrastandn_below_contrast_floor.- Return type: