contrast()

The CSS contrast() filter function increases or decreases the contrast of an element, either making colors pop out more or dulling them to gray. Unlike other filter functions like brightness() or saturate(), contrast() affects both saturation and lightness, keeping only the color’s hue. .low { filter: contrast(50%); Read more…

contrast-color()

The CSS contrast-color() function takes a <color> value (as well as a variable) and returns either black or white, whichever is the most contrasting color for that value. In other words, contrast-color() is sort of an accessibility tool for conforming to WCAG contrast requirements. .card { background-color: Read more…

hypot()

The hypot() function takes a list of values and returns the square root of the sum of their squares. .hypotenuse { width: hypot(30vmin, 40vmin); /* 50vmin */ } Most of the time, we’ll pass it two arguments: hypot(A, B). Think of it like Read more…