depictr.simulate_cvd#
- depictr.simulate_cvd(colours, deficiency, severity=1.0)#
Simulate how a palette appears under a colour-vision deficiency.
- Parameters:
colours (list of str) – Colours (any matplotlib-readable form) to transform.
deficiency ({"protan", "deutan", "tritan"}) – The deficiency to simulate (red-, green- or blue-weak vision).
severity (float) – Severity in [0, 1]; 0 leaves the colours unchanged and 1 is the full deficiency. Intermediate values interpolate the transform towards the identity, an approximation to Machado et al.’s per-severity matrices.
- Returns:
The simulated colours as hex strings.
- Return type: