Colour values in code are expressed in formats that aren't visually intuitive — #4f46e5 doesn't tell you much until you see it rendered. ToolFlow's colour tools let you pick any colour visually and instantly see its value in HEX, RGB, and HSL, or convert between formats when your design tool and your codebase speak different colour languages.

Colour Picker

The Colour Picker gives you a visual colour wheel to select any colour, then instantly displays the equivalent HEX, RGB, and HSL values. Click a format value to copy it to your clipboard.

You can also type directly into any of the three format fields to start from a known value — useful when you have a HEX code from a design file and want to see the RGB or HSL equivalent.

Colour format guide

HEX

HEX (hexadecimal) is the most widely-used colour format on the web. It represents red, green, and blue channels as two hexadecimal digits each, prefixed with #:

#4f46e5 — breaks down as 4f (red = 79), 46 (green = 70), e5 (blue = 229).

Use HEX for: HTML attributes, CSS colour values, design tool exports, most colour pickers in CMS platforms and email builders.

RGB

RGB expresses colour as three decimal values (0–255) for red, green, and blue:

rgb(79, 70, 229) — the same colour as #4f46e5 above.

Use RGB for: CSS where you need to add transparency (rgba(79, 70, 229, 0.5)), JavaScript colour manipulation, graphics software that uses decimal colour inputs.

HSL

HSL stands for Hue, Saturation, Lightness:

hsl(243, 75%, 59%) — Hue 243° (blue-purple), Saturation 75%, Lightness 59%.

Use HSL for: generating colour variations programmatically. If you want a lighter version of a colour, increase the Lightness value. A darker version — decrease it. This is much more intuitive than manipulating HEX or RGB channels directly. HSL is particularly useful in CSS custom properties for design systems where you define a base hue and generate a full shade scale.

When to convert formats

  • Design tool → CSS — Figma exports HEX; your SCSS uses HSL for a shade scale. Convert once, use everywhere.
  • Brand guide → code — brand specifications often give RGB values; your CSS codebase uses HEX.
  • Adding transparency — HEX supports 8-digit alpha variants (#4f46e580) but rgba() is often clearer; convert HEX to RGB then add the alpha channel.

Colour Converter

The Colour Converter converts directly between HEX, RGB, and HSL. Enter any format and the other two update instantly — no need to open the full colour picker if you already know the value you want to convert.

Pick and convert colours

Frequently asked questions

What is the difference between HEX and RGB?

They represent the same information in different notations. HEX uses base-16 (hexadecimal) digits; RGB uses base-10 (decimal) integers from 0–255. #ff0000 and rgb(255, 0, 0) are both pure red.

Why use HSL over HEX or RGB?

HSL is more intuitive for generating colour variations. To make a colour lighter, increase the L value. To make it less saturated, decrease S. This is much harder to reason about in HEX or RGB, where all three channels interact to produce the visual result.

Does the colour picker support CMYK?

No — the tool outputs HEX, RGB, and HSL, which are screen colour spaces. CMYK is used in print and requires a separate colour profile conversion.

Is the output suitable for CSS?

Yes — all three formats are valid CSS colour values. HEX (#4f46e5), RGB (rgb(79, 70, 229)), and HSL (hsl(243, 75%, 59%)) are all supported in all modern browsers.

Does it run in my browser?

Yes — colour picking and conversion are calculated locally using the Canvas API and JavaScript. Nothing is uploaded.

← All articles

More free tool guides