accessiplot.detection.color_detection.full_detection

accessiplot.detection.color_detection.full_detection(plt, threshold: int = 6, show_comparison_plots: bool = False)[source]

Given a line chart, detect if its use of color is unfriendly to people with either deuteranomaly, protanomaly or tritanomaly, and display the simulation for those color vision deficiencies.

Parameters:
pltmatplotlib.pyplot

A matplotlib.pyplot object in which a line chart is plotted.

threshold: int

Threshold to detect if the Dealta-E value between two colors is below it.

show_comparison_plots: bool

Switch to toggle whether to plot comparisons as part of the detection.

Returns
——-
flag: bool

Whether or not there exists a pair of colors in the given list that are too similar to each other.

detections: dict

A dictionary that represents which color vision deficiency had a detection.