Skip to content
FiftyCalc Free calculators for all 50 states

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

Sample figures

RGB—

HSL —

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Hex to RGB Converter

Hex color: type the text to use. Prefilled example: #1E90FF.

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.

  1. Hex color: type the text to use.
  2. 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
RGBrgb(30, 144, 255)
HSLhsl(210, 100%, 56%)

Frequently asked questions

What is #FFFFFF in RGB?

rgb(255, 255, 255), white.

Related calculators