BOSA Accessibility Check is a client-side JavaScript application that checks a HTML document or source code, and detects violations of a defined coding standard. Comes with standards that cover the three conformance levels of the W3C's Web Content Accessibility Guidelines (WCAG) 2.1 and the U.S. Section 508 legislation.
From the Test page at https://github.com/openfed/AccessibilityCheck/blob/master/Tests/WCAG2/1_4_3_Contrast.html