Color Converter (HEX, RGB, HSL)
Type a color in HEX, RGB or HSL, or pick one, and get the same color in the other formats.
Result
How to use it
- Type a color in HEX, RGB or HSL, or use the color picker.
- The other formats update as you type.
- Copy the format you need from the result.
About this tool
Web colors can be written in several formats. HEX is a compact code such as #FF8800. RGB gives the amounts of red, green and blue from 0 to 255. HSL describes a color by hue (the position on the color wheel), saturation (how vivid) and lightness (how light or dark).
All three describe the same colors, so converting between them does not change how the color looks. Designers often use HEX or RGB in code and HSL when adjusting shades.
Formula
- HEX #RRGGBB: each pair of digits is a number from 0 to 255 in base 16 (hexadecimal).
- RGB: red, green and blue values from 0 to 255.
- HSL: hue 0 to 360 degrees, saturation and lightness 0 to 100%.
Examples
- #FF0000 = rgb(255, 0, 0) = hsl(0, 100%, 50%)
- #FF8800 = rgb(255, 136, 0) = hsl(32, 100%, 50%)
- #00A86B = rgb(0, 168, 107) = hsl(158, 100%, 33%)
- #1E90FF = rgb(30, 144, 255) = hsl(210, 100%, 56%)
- #FFFFFF = rgb(255, 255, 255) = hsl(0, 0%, 100%)
- #000000 = rgb(0, 0, 0) = hsl(0, 0%, 0%)
Tips
- A 3-digit HEX such as #F80 is shorthand for #FF8800.
- Use HSL when you want to make a color lighter or darker: change only the lightness.
- Check text and background contrast before you use a color pair on a page.
Questions and answers
What is a HEX color code?
A six-digit code that gives red, green and blue in hexadecimal, such as #FF8800 for orange.
How do I convert HEX to RGB?
Split the code into three pairs and convert each pair from hexadecimal to a number from 0 to 255.
What is HSL?
Hue, saturation and lightness: a way to describe a color that is easier to adjust by eye than RGB.
Are my colors saved or sent anywhere?
No. The conversion runs in your browser on your own device. Nothing you type is sent to Paul Digital or any other server.
More tools
- HEX to RGB Converter
- RGB to HEX Converter
- HEX to HSL Converter
- Hex to Decimal Converter
- All color tools
Privacy
The conversion runs in your browser on your own device. Nothing you type is sent to Paul Digital or any other server. Colors may look slightly different on different screens.