RGB to HEX Color Converter
Result
RGB to HEX Color Converter is a mathematics calculator that helps you calculate a measurement from one unit to an equivalent in another unit. The formula used is: HEX = '#' + R.toString(16) + G.toString(16) + B.toString(16)\nLuminance = 0.299R + 0.587G + 0.114B\nHSL: L = (max+min)/2; S = (max-min)/(1−|2L−1|). Ensure all inputs share the same unit system (e.g. all metres or all feet) unless the formula converts between units.
Formula
Example Calculation
- Red (R): 255
- Green (G): 128
- Blue (B): 0
Suppose you enter: Red (R) = 255, Green (G) = 128, Blue (B) = 0. The calculator applies the formula (HEX = '#' + R.toString(16) + G.toString(16) + B.toString(16)\nLuminance = 0.299R + 0.587G + 0.114B\nHSL: L = (max+min)/2; S = (max-min)/(1−|2L−1|)) and shows all output values below. Change any input field to immediately see how the result changes.