KiloAtlas
EN
EnglishBahasa IndonesiaTiếng Việt

Color converter

Convert a color between HEX, RGB and HSL.

HEX

—
RGB
—
HSL
—

Your result is calculated in your browser.

Formula

HEX stores three 8-bit RGB channels; HSL describes hue, saturation and lightness of sRGB.

How to use

  1. Enter HEX, rgb(r, g, b) or hsl(h, s%, l%).
  2. Read the three color formats.
  3. Copy the codes and inspect the preview.

Examples

  • #f00 = rgb(255, 0, 0) = hsl(0, 100%, 50%).

Frequently asked questions

Which HEX lengths work?

Three or six digits, with an optional #. Alpha transparency and named colors are not supported.

What ranges can I enter?

RGB uses integers 0–255. HSL uses degrees for hue and 0–100% for saturation and lightness.

Is HSL conversion exact?

HSL input is rounded to 8-bit RGB first. Output HSL uses up to four decimal places; gray has hue 0 by convention.

Sources

Updated:

Related tools

Search conversion tools