Developer

Color Converter & Palette

Convert HEX/RGB/HSL and build palettes.

3-digit (#4cf) or 6-digit; the # is optional.

Result

#4C5FD5

HEX#4c5fd5
RGBrgb(76, 95, 213)
HSLhsl(232, 62%, 57%)

Shades & Tints

Analogous

Pick a color or enter a HEX code.

What is this converter?

The color code converter takes a color from the picker or a typed HEX code and instantly converts it to HEX, RGB and HSL. It also builds Shades & Tints and Analogous palettes from that color — handy for web/app design, CSS work and choosing color schemes.

Notation differences

HEX — #RRGGBB hexadecimal; red/green/blue each 00–FF (0–255).

RGB — rgb(r, g, b), each channel 0–255.

HSL — hsl(h, s%, l%), Hue 0–360°, Saturation, Lightness. All three describe the same color in different ways.

Using the palette
  • Shades & Tints — 9 steps varying lightness (L) from 10% to 90% at the same hue and saturation.
  • Analogous — neighboring hues at ±30° and ±60° on the color wheel for harmonious schemes.
HEX→RGB→HSL conversion, worked example

Converting each HEX byte pair to decimal gives you RGB directly. For example #2ecc71 is 2e=46, cc=204, 71=113, so RGB is rgb(46, 204, 113). To get HSL, normalize R/G/B to 0-1, derive lightness (L) and saturation (S) from the max/min difference, then compute the hue angle (H) from whichever channel is the max.

StepCalculationResult
HEX→RGB0x2e=46, 0xcc=204, 0x71=113rgb(46, 204, 113)
Normalize46/255=0.180, 204/255=0.800, 113/255=0.443max=0.800(G), min=0.180(R)
Lightness L(max+min)/2 = (0.800+0.180)/20.49 → 49%
Saturation SL not > 0.5, so (max-min)/(max+min)0.632 → 63%
Hue Hmax is G, so 60×((B-R)/d+2)145°

So #2ecc71 becomes hsl(145, 63%, 49%) — try it in the tool above to confirm.

Why HSL is easier for adjusting colors

HSL separates hue, saturation, and lightness into independent axes closer to how humans perceive color. Brightening a color in RGB means scaling R, G, and B together proportionally, while HSL only needs lightness (L) to change — the hue and saturation stay untouched. This tool's Shades & Tints palette works exactly this way, sweeping only L from 10% to 90%. The same logic makes lowering saturation for muted tones, or rotating hue by ±30°/±60° for analogous colors, far more intuitive than doing the equivalent math in RGB.

How do HEX, RGB and HSL differ?
HEX is #RRGGBB hexadecimal, RGB expresses red/green/blue as 0–255, and HSL uses Hue (0–360°), Saturation and Lightness. All three describe the same color in different ways, and this tool converts between them.
How do I use the palette?
From your color it generates 9 Shades & Tints and Analogous swatches. Use them to build UI color sets — buttons, backgrounds, accents — or design schemes. Click any swatch to copy its HEX code.
Does a 3-digit HEX (#4cf) work?
Yes. A 3-digit shorthand like #4cf is expanded by doubling each digit to #44ccff before converting. The # is optional.
Can I use it directly in CSS?
The HEX, RGB and HSL results are shown in ready-to-paste CSS forms (#4c5fd5, rgb(76, 95, 213), hsl(232, 62%, 57%)). Click a value or swatch to copy it to your clipboard.
Is my color data stored?
All conversions run entirely in your browser; the color values you enter are never sent to a server or stored. It is free with no sign-up.
How is a HEX code like #2ecc71 converted to HSL?
Converting each HEX byte pair to decimal gives RGB (e.g. #2ecc71 → rgb(46,204,113)). Normalize RGB to 0-1, derive lightness/saturation from the max/min values, and compute hue from whichever channel is the max — the result is hsl(145, 63%, 49%), matching the tool's output.
What happens when I adjust only lightness (L)?
Raising or lowering only lightness (L) keeps the same hue and saturation while changing only brightness. Adjusting brightness in RGB requires scaling R, G, and B together proportionally, while HSL only needs one value — much more intuitive.
What's the difference between saturation (S) and lightness (L)?
Saturation is how vivid a color is (distance from gray), while lightness is how bright it is (from black to white). Dropping saturation to 0% gives pure gray, and setting lightness to 0% or 100% gives black or white regardless of saturation.