colora11y
colora11y is a simple JavaScript color contrast calculator created and maintained by Matt Long.
Usage
colora11y;// also supports rgbcolora11y;/*would return the following:{ "aa": { "normal":{ "min":"4.5:1", "pass":false }, "large":{ "min":"3:1", "pass":false }, "nontext":{ "min":"3:1", "pass":false } }, "aaa":{ "normal":{ "min":"7:1", "pass":false }, "large":{ "min":"4.5:1", "pass":false } }, "ratio":"1.17:1"}*/
License
ColorA11y is licensed under the MIT License.