01 / Example
Example
rgb(42, 127, 220)hsl(211.35, 71.77%, 51.37%)Text & code / MULTIVERTO
Translate integer RGB channels into hue, saturation and lightness.
Apply each text tool to the previous result. Text workflows ↗
Only the recipe name and tool order are saved in this browser. Your input and results are never saved.
01 / Example
rgb(42, 127, 220)hsl(211.35, 71.77%, 51.37%)02 / Guide
Translate integer RGB channels into hue, saturation and lightness. Use RGB to HSL when you know exact red, green and blue channels but want a more intuitive way to compare colors or adjust a palette. The tool accepts integer channels from zero through 255, either in rgb() syntax or separated by commas. It derives hue from the dominant channel and the differences between channels.
The channels are normalized to 0–1; their maximum, minimum and difference determine HSL. Saturation falls to zero when all three channels are equal; gray then has no meaningful hue, so the output uses zero degrees by convention. Lightness is based on the midpoint between the highest and lowest normalized channel. The sample yields an HSL color near 211 degrees, useful for finding related blues. Displayed percentages are rounded to two decimals.
The HSL result is useful when a palette task asks how colors relate by hue, but a single change to HSL does not guarantee a visually uniform change. The conversion describes the same opaque RGB color in hue, saturation and lightness; it does not calculate perceptual contrast.
Two RGB triples with equal red, green and blue values are gray: their saturation is zero and hue is conventionally reported as zero, not a measured direction on the color wheel. Near-gray inputs can therefore show unstable hue from a one-channel edit. If you later convert rounded HSL percentages back to integer RGB, compare the channels rather than demanding a byte-for-byte match. Keep the original RGB values when precise design tokens must be recovered.
For a concrete check, the example input rgb(42, 127, 220) produces hsl(211.35, 71.77%, 51.37%). Check an achromatic input first: equal RGB channels produce zero saturation and a conventional hue value even though hue has no visible effect. Near gray, a small channel change may move the reported hue sharply. If you convert the displayed HSL percentages back, rounding can change an RGB channel. Retain the original RGB triplet when a precise design token or comparison must be recoverable. When entering RGB channels, start from the actual integer values in the source file rather than judging a color swatch by eye. Inspect the HSL result at the endpoints: equal channels should have no saturation, while black and white make hue visually irrelevant. If the receiving editor rounds percentages, compare a later RGB conversion with the original channels and keep the source values for exact reuse. A one-channel difference after a round trip can come from display precision rather than a different intended color. Check opacity separately, because this three-channel result cannot carry alpha.
Explore guides