Color Converter (HEX to RGB/HSL)

Convert any HEX colour code into RGB and HSL — handy for design, CSS and development.

Share
Advertisement

What is the Color Converter (HEX to RGB/HSL)?

Colours are written differently depending on the tool: HEX (#RRGGBB) is the standard for web development and CSS, RGB (red, green, blue values from 0–255) is how displays and print software often expose colour, and HSL (hue, saturation, lightness) is popular in design tools because it's more intuitive to tweak — sliding lightness up or down changes shade without shifting the actual colour.

How to Calculate

Enter a HEX colour code. The calculator splits it into its red, green and blue components (each a pair of hex digits, 00–FF), converts those to their 0–255 decimal values for RGB, and then applies standard colour-space maths to derive the equivalent HSL values.

Formula

#RRGGBB → rgb(r, g, b) → hsl(h, s%, l%)

How to Use

  1. Enter your details in the fields above.
  2. The result updates instantly as you type.
  3. Use Copy, Print or Download PDF to save your result.

Frequently Asked Questions

What is HSL good for?
HSL makes it intuitive to adjust colours u2014 change the hue to shift the colour, or lightness to make it lighter/darker u2014 which is why designers like it.
Advertisement
Was this calculator helpful?
Embed this calculator

Copy this code to add the calculator to your own website: