element_51.figuresΒΆ
PNG files of a chart or a picture, for Save as PNG.
A chart is drawn by matplotlib on a white page, a picture is enlarged by a whole number with Pillow. Both come out at 300 dpi. matplotlib and numpy are loaded the first time a chart is drawn, so import element_51 stays quick.
Functions
|
Draw lines as one chart and return it as a PNG file. |
|
Find the WCAG contrast ratio of colour against white. |
|
Darken colour, keeping its hue, until white shows it at ratio. |
|
Enlarge image by a whole number to fill the page and return a PNG. |
Classes
|
One line of a chart. |