The same blue can be written as #1E90FF, rgb(30, 144, 255), hsl(210, 100%, 56%) or cmyk(88%, 44%, 0%, 0%). They all describe one colour, just for different jobs. This guide explains each format and when to use it. Convert between any of them instantly with the free Color Converter.
RGB: how screens make colour
Screens mix red, green and blue light. Each channel goes from 0 (off) to 255 (full).
- rgb(255, 0, 0) is pure red.
- rgb(255, 255, 255) is white; rgb(0, 0, 0) is black.
- rgb(30, 144, 255) is “dodger blue”.
HEX: RGB in a short code
HEX writes the same three numbers in base 16: #RRGGBB. 30 = 1E, 144 = 90, 255 = FF, so rgb(30, 144, 255) is #1E90FF.
- Short form: #F60 means #FF6600.
- HEX is the most common format in websites, design tools and brand guidelines.
HSL: colour the way people think about it
HSL describes hue (the colour angle on a wheel, 0–360°), saturation (0% grey to 100% vivid) and lightness (0% black, 50% the pure colour, 100% white).
HSL is the easiest format for building variations: keep the hue and saturation, change only the lightness, and you get lighter and darker versions of the same colour for hover states and palettes.
HSV / HSB: what design apps show
HSV (also called HSB) uses hue and saturation too, but value/brightness instead of lightness: 100% is the pure colour, 0% is black. Figma, Photoshop and many colour pickers show HSB, which is why the numbers differ from CSS’s HSL for the same colour.
CMYK: colour for printing
Printers mix cyan, magenta, yellow and black (key) inks. Converting a screen colour to CMYK mathematically gives a starting point, but real printing depends on the paper and the printer’s colour profile. Bright screen colours, especially vivid blues and greens, may not be reproducible in ink at all. For brand work, ask your print shop for a proof.
Transparency: RGBA and 8-digit HEX
Add an alpha value for opacity:
- rgba(30, 144, 255, 0.5): 50% opacity.
- #1E90FF80: the same in 8-digit HEX (80 in HEX is 128, about 50%).
- hsla(210, 100%, 56%, 0.5) in HSL.
Android and Flutter write colours as 0xAARRGGBB, with alpha first: 0xFF1E90FF is fully opaque dodger blue.
Which format to use
| Job | Best format |
|---|---|
| Website CSS | HEX, or HSL for variations |
| Overlays and shadows | RGBA or HSLA |
| Design apps | HEX or HSB |
| Android / Flutter | 0xAARRGGBB |
| Printing | CMYK from your printer |
Is your coloured text readable?
The WCAG contrast ratio compares how light two colours are. For normal text, aim for at least 4.5:1 (level AA); 7:1 is AAA. Large text needs 3:1. Light grey on white often fails. The converter shows the ratio of your colour on white and on black, plus tints and shades you can switch to if it fails.
Finding a colour’s code
- From anything on your screen: read how to find the colour code of anything on screen.
- From a photo: use the Image Color Picker.
- For a whole palette from an image: use the Palette Extractor.
Convert, adjust and check contrast in one place with the Color Converter.
Common questions
Are HEX codes case-sensitive? No. #1e90ff and #1E90FF are the same colour.
Why does my colour look different on another screen? Screens differ in brightness, calibration and colour space, so the same code can look slightly different. Phones in night mode shift colours too.
Can every RGB colour be printed? No. Very bright screen colours, especially vivid blues and greens, fall outside what CMYK inks can reproduce, so printers choose the closest match.



