Colour Converter: HEX, RGB, HSL and OKLCH, With Shades

Convert any colour between HEX, RGB, HSL, OKLCH and CMYK, see its contrast with white and black, and get ten shades from 50 to 900 ready as CSS variables.

Convert a colour
50100200300400500600700800900#9333EArgb(147 51 234)oklch(55.8% 0.25 302)

Converter

Colour formats and when to use them

FormatExampleWhen to use it
HEX#1557b0Most common in CSS and design
RGBrgb(21 87 176)When you need transparency with alpha
HSLhsl(214 79% 39%)To lighten or darken by hand
OKLCHoklch(48% 0.16 258)Newest; steps look evenly bright to the eye
CMYK88% 51% 0% 31%For print (approximate)

Why shades from 50 to 900?

A full system

One brand colour becomes ten shades: light for backgrounds, mid for buttons, dark for text.

OKLCH steps

Shades are computed in OKLCH so they look evenly stepped to the eye instead of uneven jumps.

Check readability

Test each text and background pair in the contrast checker.

Example: your site colours from your logo

Paste your main logo colour here, then copy the ready CSS variables into your theme settings or Custom CSS. Use 50 or 100 for backgrounds, 500 or 600 for buttons and 800 or 900 for text, then check text and background pairs in the contrast checker.

Key terms

Short definitions of what you meet along the way.

HEX
A colour written as six hex digits such as #1557b0.
HSL
Colour as hue, saturation and lightness; easy to lighten or darken.
OKLCH
A modern format where lightness looks even to the eye across hues.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

Do browsers support OKLCH?

Modern browsers do. As a fallback, put a HEX value before it in the same property.

Why is CMYK approximate?

Print colour depends on paper, ink and printer. Ask your printer for its colour profile.

Where do I get my brand colour?

Extract it from your logo with the Palette from image tool in the designer tools.

Want a professionally designed site?

We design modern Arabic sites with a consistent identity.

Contact us on WhatsApp