Hex to RGB Converter
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Convert a hex color code (#RRGGBB or #RGB) to RGB and HSL values for CSS and design tools.
Result
RGB
HSL
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
Affiliate link
This is an affiliate link: FiftyCalc may earn a commission if you buy through it. This does not change the result.
Corel sells CorelDRAW graphic design and technical illustration software. Visit Corel
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Hex color: type the text to use.
- Read the result: RGB; the panel also shows HSL.
How this calculator works
Each pair of hex digits is one channel from 00 to FF (0 to 255): red, green, blue. A 3-digit code repeats each digit (#FFF = #FFFFFF), as in the W3C CSS Color Module. HSL is computed with the standard RGB to HSL conversion of the same specification.
Worked example
| Hex color | #1E90FF |
|---|
| RGB | rgb(30, 144, 255) |
|---|---|
| HSL | hsl(210, 100%, 56%) |
Frequently asked questions
What is #FFFFFF in RGB?
rgb(255, 255, 255), white.