Color Converter & Palette Extractor

Convert a color between HEX, RGB, HSL and HSV, or pull a palette out of any image. Everything runs in your browser — nothing you enter or upload is ever sent anywhere.

🔒 Generated locally — nothing is uploaded

Copied!
Advertisement

Related tools

HEX, RGB and HSL are three ways of writing the same thing: a point in a color space. This tool converts a color between all of them (plus HSV/HSB), and can also read the dominant colors out of an image so you can rebuild a palette from a screenshot, a photo or a logo.

HEX vs RGB vs HSL vs HSV

RGB gives the amount of red, green and blue light (0–255 each) that makes up the color — it maps directly to how a screen produces it. HEX is the same three numbers written in base 16, e.g. #6366f1 is rgb(99, 102, 241); it's compact and is the default in CSS and design tools. HSL (hue, saturation, lightness) and HSV/HSB (hue, saturation, value/brightness) describe the color the way a person tends to think about it: pick a hue on the 0–360° wheel, then adjust how vivid and how light it is. HSL and HSV are better when you want to nudge a color — darken it, desaturate it, find a matching accent — without guessing at raw channel values.

Opacity and 8-digit hex

The opacity slider adds an alpha channel. Below 100% the tool switches its output to rgba() / hsla() and to 8-digit hex (#6366f1cc), where the last two characters are the alpha byte. All modern browsers support 8-digit hex, so #rrggbbaa is a valid, self-contained way to store a semi-transparent color.

💡 Tip: you can paste almost any CSS color string into the HEX, RGB or HSL box — #fff, rebeccapurple, rgb(255 0 0 / 50%), hsl(210deg 50% 40%) — and it will be parsed and normalized.

How the palette extractor works

The image is drawn to an off-screen canvas, scaled down for speed, and its pixels are read back with getImageData. A median-cut algorithm then repeatedly splits the set of colors along its widest channel until it has as many groups as you asked for, and averages each group to a representative swatch. Near-transparent pixels are ignored. Because this all happens on a canvas in the page, the image is never uploaded — closing the tab discards it completely.

Frequently asked questions

Is my image or color sent to a server?

No. Every conversion is plain arithmetic in your browser, and the palette extractor reads the image from a local canvas. Nothing is uploaded, logged or stored.

Why does the extracted palette differ slightly from other tools?

Different tools use different quantization methods (median cut, k-means, octree) and different downsampling, so the representative colors vary a little. The relative palette — the mood and the dominant hues — should be consistent.

What's the difference between HSV and HSB?

None — they're two names for the same model. "Value" and "Brightness" both refer to the V/B component. Photoshop calls it HSB; most other software calls it HSV.

Can I convert CMYK or LAB here?

Not currently. CMYK depends on the specific printing profile and LAB is device-independent in a way that needs a reference white point, so a naive conversion would be misleading. This tool sticks to the screen color models that convert exactly.

Advertisement