colour.plotting.plot_cvd_simulation_Machado2009#

colour.plotting.plot_cvd_simulation_Machado2009(RGB: ArrayLike, deficiency: Union[Literal['Deuteranomaly', 'Protanomaly', 'Tritanomaly'], str] = 'Protanomaly', severity: float = 0.5, M_a: Optional[ArrayLike] = None, **kwargs: Any) Tuple[Figure, Axes][source]#

Perform colour vision deficiency simulation on given RGB colourspace array using Machado et al. (2009) model.

Parameters:
  • RGB (ArrayLike) – RGB colourspace array.

  • deficiency (Union[Literal['Deuteranomaly', 'Protanomaly', 'Tritanomaly'], str]) – Colour blindness / vision deficiency type.

  • severity (float) – Severity of the colour vision deficiency in domain [0, 1].

  • M_a (Optional[ArrayLike]) – Anomalous trichromacy matrix to use instead of Machado (2010) pre-computed matrix.

  • kwargs (Any) – {colour.plotting.artist(), colour.plotting.plot_image(), colour.plotting.render()}, See the documentation of the previously listed definitions.

Return type:

Tuple[Figure, Axes]

Notes

  • Input RGB array is expected to be linearly encoded.

Returns:

Current figure and axes.

Return type:

tuple

Parameters:
  • RGB (ArrayLike) –

  • deficiency (Union[Literal['Deuteranomaly', 'Protanomaly', 'Tritanomaly'], str]) –

  • severity (float) –

  • M_a (Optional[ArrayLike]) –

  • kwargs (Any) –

Examples

>>> import numpy as np
>>> RGB = np.random.rand(32, 32, 3)
>>> plot_cvd_simulation_Machado2009(RGB)  
(<Figure size ... with 1 Axes>, <...AxesSubplot...>)
plot_cvd_simulation_Machado2009