What the RGB to HEX Converter does
Enter red, green and blue values from 0 to 255 and the tool shows the HEX code, the HSL value and a swatch of the resulting color.
Invalid values such as 256 or decimals are rejected with a clear message.
How to use it
- Enter the three channel values.
- Check the swatch.
- Copy the HEX or HSL result.
Practical examples
- rgb(37, 99, 235) = #2563EB.
- rgb(0, 0, 0) = #000000.
Features
- Validation of 0–255 whole numbers
- HEX, HSL and CSS output
Limitations
- Only whole-number channel values are accepted.
- sRGB only.
Privacy
This tool runs entirely in your browser. What you type is not sent to our servers and is discarded when you close or reload the page.
Frequently asked questions
Why must values be whole numbers?
Each channel is stored as one byte, so it has exactly 256 possible values.