Color Converter
Convert opaque sRGB colors between HEX, integer RGB, and HSL representations.
Loading tool…
How to use Color Converter
Translate common CSS color values using explicit numeric color math. The result includes six-digit HEX, RGB channels, and an HSL equivalent for use in design or code.
- Enter #RGB, #RRGGBB, rgb(r, g, b), or hsl(h, s%, l%).
- Select Run tool to convert the color into three common forms.
- Review the result, then copy it or download the generated file.
Good to know
- Opaque sRGB colors only. No alpha, named colors, percentages in RGB, CSS variables, color(), Lab, or display-P3.
- RGB channels are integers; HSL input converts to nearest integer RGB and output HSL is rounded to two decimals.
Common questions
Why does a round trip change HSL slightly?
Eight-bit RGB channels quantize a continuous HSL color, and the displayed HSL value is rounded.
Keep going with related tools
All colors →Color Contrast Checker
Calculate WCAG sRGB contrast and report AA/AAA text thresholds for two opaque colors.
ColorsCSS Gradient Generator
Generate a two-color linear-gradient declaration with validated colors, angle, and stop positions.
ColorsColor Difference Calculator
Calculate CIELAB DeltaE76 distance between two opaque sRGB colors.
ImagesImage Pixel Color Sampler
Read a precise local image pixel’s RGBA values and download a whole-cell magnified patch around that coordinate.
ColorsPalette File Workbench
Read GIMP GPL/JSON swatches and export ordered GPL, JSON or escaped CSS variables.
ImagesCube LUT Workbench
Inspect a supported .cube lookup table or apply it to a bounded raster image.