Color converter
Convert HEX to RGB, or RGB channel values to HEX and HSL.
Inputs stay in your browser
Interactive tool
Enable JavaScript to use the interactive controls. The guide below is available without JavaScript.
The color converter supports three- or six-digit HEX input and numeric red, green, and blue channels. It produces CSS-style RGB, HEX, and HSL representations.
When to use this tool
- Inspect the RGB channels of a HEX design color.
- Create a HEX and HSL representation from RGB values.
How to use
- Enter a HEX value or RGB channels from 0 to 255.
- Review the corresponding color notation.
- Copy the generated text.
Example
Brand green
#187b69 converts to rgb(24, 123, 105); those RGB channels produce #187b69 and an HSL value.
How it works
- HEX stores each RGB channel as two hexadecimal digits. HSL is derived from normalized RGB extrema and rounded to integer hue, saturation, and lightness values.
Limits and notes
- RGB channels are rounded to the nearest integer for HEX output.
- The tool does not convert alpha, wide-gamut color spaces, profiles, LAB, LCH, or color appearance.
- Displayed HSL rounding can prevent an exact round trip.
Frequently asked questions
Does three-digit HEX work?
Yes. Each digit is doubled, so #abc is interpreted as #aabbcc.
Are RGB values clamped?
No. Values outside 0–255 are rejected instead of clamped.
References
Related tools
Send tool feedback
The message includes page context only, never tool input or results.
Send tool feedback