API Reference
This is the class and function reference for accessiplot
. Please refer to
the full user guide for further details, as the class and
function raw specifications may not be enough to give full guidelines on their
uses.
accessiplot.detection
: Inaccessibility Detection of Plots
The accessiplot.detection
sub-module defines a set of tests of accessibility.
Contrast Ratio Detection
Pass in a contrast ratio and it will detect if it is below a limit. |
|
Generates dictionaries of the contrast_ratios_by_index and detections. |
|
Calculates the contrast ratio given two tuples of normalized rgb values. |
|
Calculates the relative luminance given a tuple of normalized rgb values. |
|
|
Normalize the , G, or B value using the WCAG 2.0 formula defined for calculating the relative luminance. |
Color Detection
Given a file name of an image, return a list of most common colors used in the image, in RGB. |
|
Given a line chart, return a list of colors used for the lines and background, in RGB. |
|
|
Given an image, simulate how a person with color vision deficiency will see it. |
|
Given an original version of an image and a tuple of its modified versions, display them in a single plot for readers to compare. |
|
Given a list of colors, check if any two of them are too similar to each other in the eye of someone with a specified color vision deficiency. |
|
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. |
Missing Label Detection
Generates dictionaries of the contrast_ratios_by_index and detections. |
Missing Marker Detection
|
Dummy function to prove out retrieving a list of markers given a Matplotlib pyplot object. |
Overcomplexity Detection
|
Given a line chart, calculate its visual complexity based on Pixel Approximate Entropy. |
Detection Handler Classes
|
This is the entry point for generating detection outputs for a given axes object. |
|
Enum used to keep track of supported detection tests. |
accessiplot.utils
: Utility Functions and Classes
Chart Type Enum
|
Enum used to keep track of supported chart types |
Chart Type Detection
Determines the chart type based on the Axes object. |