accessiplot.detection.color_detection.convert_image

accessiplot.detection.color_detection.convert_image(img, color_vision_deficiency: str = 'deuteranomaly', severity: int = 100)[source]

Given an image, simulate how a person with color vision deficiency will see it.

Parameters:
img: arr

An array-like of colors representing an image to be simulated.

color_vision_deficiency: str

The color vision deficiency to be simulated. It can be “deuteranomaly”, “protanomaly”, or “tritanomaly.

severity: int

The severity of color vision deficiency to be simulated, with 100 being the most severe one.

Returns:
result_image: arr

An array-like of colors representing an image after simulation.