GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

05Contrast Badge That Crosses a Pass Line From a Hex Value

The luminance of a typed hex value is computed to get contrast ratios against white and black backgrounds, and badge color and text switch based on whether it clears the pass threshold.

Best forDesign-system docs and accessibility-check tools

hexToRgbrelativeLuminancecontrastRatio
Contrast Badge That Crosses a Pass Line From a Hex Value
Open in a new tab

05 Contrast Badge That Crosses a Pass Line From a Hex Value — Measured area 4.078% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · CSS Calculator Design: 9 Inputs, Unit Converter UI

The post this demo lives in

CSS Calculator Design: 9 Inputs, Unit Converter UI - preview of all 9 demosCSS Calculator Design: 9 Inputs, Unit Converter UIAmong nine css calculator design inputs, one draws a QR grid from a text value, one fills a ring gauge from a birthdate See all demos in this post

If you like this effect - similar demos