Contrast and readability validation in scenes (litmus-r363)
Ensure scenes expose real readability issues such as low contrast and color blending.
Summary of Changes
Added contrast module to litmus-model with:
- WCAG 2.1 relative luminance calculation (
srgb_to_linear,relative_luminance) contrast_ratio(c1, c2): standard WCAG contrast ratio (1.0 to 21.0)validate_scene_contrast: checks every non-whitespace span in a scene, resolving semantic colors against a theme, with separate thresholds for normal vs bold textvalidate_theme_readability: convenience function that checks all built-in scenes at WCAG AA levelContrastIssuestruct with full location info (scene/line/span), colors, ratio, and threshold