Kontrasto
Kontrasto is a dual Python and JavaScript library which analyses instances of text over images, and transforms the text to make it more readable and have a higher contrast against the background.
Usage
Install Kontrasto from:
Using Kontrasto both server-side and client-side gives the best results: server-side processing means users will have the best possible styles as the page loads, while client-side processing can refine the result based on the final position of the text over the image.
Demo
For each image, we display the test text across 9 areas. Each area has the text 4 times: first the result of server-side processing, with WCAG 2 and WCAG 3 contrast ratio calculations. Then the result of client-side processing, also with WCAG 2 and WCAG 3 contrast ratio calculations.