How to use this tool
Paste a supported HEX, rgb() or hsl() value. Results update immediately. You can also choose a color with the picker or try a format example. Copy the format you need; Clear removes the input and results.
Convert HEX to RGB and HSL, RGB to HEX, or HSL to RGB. Paste a color code or use the picker, preview the color, and copy each format. Free and browser-only.
● Your files stay yoursLoading converter…
Reload converterPaste a supported HEX, rgb() or hsl() value. Results update immediately. You can also choose a color with the picker or try a format example. Copy the format you need; Clear removes the input and results.
Opaque sRGB colors only. HEX: 3 or 6 digits, with or without #. RGB: three values from 0–255, or three percentages from 0–100%. HSL: hue 0–360 (optional deg), saturation and lightness 0–100% with percent signs. Commas or spaces are accepted. Decimal point: period; Arabic/Persian digits work. No alpha, named colors, CSS variables, other angle units, CMYK or wide-gamut colors. Inputs stay in memory and are not uploaded or saved.
These notations describe sRGB colors in different ways. HEX uses hexadecimal channel values; RGB uses red, green and blue channels; HSL uses hue, saturation and lightness. The examples below represent the same color across each row.
| HEX | RGB | HSL |
|---|---|---|
| #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| #00FF00 | rgb(0, 255, 0) | hsl(120, 100%, 50%) |
| #0000FF | rgb(0, 0, 255) | hsl(240, 100%, 50%) |
Split a six-digit HEX code into three pairs and convert each pair from base 16 to decimal. #FF8000 becomes rgb(255, 128, 0). A short code duplicates each digit: #abc becomes #AABBCC.
Paste rgb(255, 128, 0) or hsl(30, 100%, 50%). The converter calculates whole-number RGB channels, then writes each channel as two hexadecimal digits.
HSL can describe values between 8-bit RGB steps. This tool rounds to whole RGB channels first, then calculates HSL to two decimals. Small numerical differences can occur when converting back and forth.
Gray has zero saturation, so hue does not affect its appearance. The converter uses hue 0 for this case.
No. Use the related contrast checker for text/background contrast. CMYK requires a print color profile and is outside this tool’s scope.