How is it calculated?
On screen, colours are a mix of red, green and blue light (RGB). The HEX code is the hexadecimal form of these three values. HSL describes the same colour by hue, saturation and lightness. CMYK gives the ink proportions used in print.
The contrast ratio shows how readable text is: at least 4.5:1 is recommended for normal text (WCAG).
"Pick from screen" works in Chrome and Edge.
Example
#7B1F2E = rgb(123, 31, 46). Its contrast ratio with white text is about 10:1.