Search the complete library

Find a useful next step.

Start typing to search the complete UtilHub library.

Digital & media · Free online tool

Colour code converter

Convert colours between HEX, RGB, HSL, HSV and CMYK, with a preview and the more readable text colour to use on it.

No sign-upNo run limitPrivate inputsMobile-friendly

Colour code converter workspace

Runs locally in your browser

HEX (#1a73e8 or #abc), rgb(26, 115, 232), hsl(214, 82%, 51%), hsv(…) or cmyk(89%, 50%, 0%, 9%).

Result

HEX—
RGB—
HSL—
HSV / HSB—
CMYK (approx.)—
Best text colour—
Colour preview
Colour preview
CSS

Use it with confidence

How to use the colour code converter.

01

Add the requested inputs

Use the labelled fields in the workspace above. If example values are provided, try them first or replace them with your own.

02

Calculate and review

Use the main action when needed. HEX is RGB written in base 16. HSL and HSV rearrange the same RGB values into hue, saturation and lightness or value, and CMYK uses the simple formula K = 1 − max(R, G, B). Text contrast follows the WCAG relative luminance formula.

03

Try a worked example

#1A73E8 is rgb(26, 115, 232), hsl(214, 82%, 51%) and roughly cmyk(89%, 50%, 0%, 9%). Black text (4.66:1) reads slightly better on it than white (4.51:1).

04

Check the assumptions

CMYK figures are uncalibrated, so ask your printer for colour-managed values. Values are rounded, so converting back and forth can shift a channel by one.

Helpful answers

Colour code converter FAQs.

Is the colour code converter free?

Yes. Use it as often as you need, with no sign-up and no run limit. Your inputs stay in your browser.

Does UtilHub upload or save my inputs?

No. This tool runs in your browser and UtilHub does not receive or store the values you enter. Your browser or device may still retain normal local history or form data.

How does this colour code converter work?

HEX is RGB written in base 16. HSL and HSV rearrange the same RGB values into hue, saturation and lightness or value, and CMYK uses the simple formula K = 1 − max(R, G, B). Text contrast follows the WCAG relative luminance formula.

What should I check before using the result?

CMYK figures are uncalibrated, so ask your printer for colour-managed values. Values are rounded, so converting back and forth can shift a channel by one.

Coming up