Hex codes for RAL colours: what they can and cannot do
A hex code is a screen value, handy for websites and mockups but never a paint formula. What it tells you, why charts disagree and how to find the nearest RAL.

Sooner or later someone sends you six characters and a hash sign and asks for the paint. It might be a designer with a brand colour, a client who found a shade on a website, or a relative who screenshotted a front door. The hex code looks precise, and in one narrow sense it is. It just describes something other than paint, and most of the confusion around RAL and hex comes from forgetting that.
This piece is about what a hex code actually contains, why two RAL charts can list different hex values for the same number, and how to go from a hex value to a short list of RAL shades without pretending the list is more than it is.
What a hex code is
A hex code such as #1D4E89 is three numbers written in base 16. The first pair is red, the second green, the third
blue. Each pair runs from 00 to FF, which is 0 to 255 in ordinary numbers. That is all. There is no pigment in it,
no gloss, no information about the surface, the binder or the light in the room.
On the web, hex values are understood as sRGB, a standard colour space built around a typical monitor of the late
1990s. When a browser sees #1D4E89 it asks the screen for a certain amount of red, green and blue light, and the
screen does its best. A well calibrated monitor gets close to what sRGB intends. A phone in night mode, a cheap
office screen or a wide-gamut laptop without proper colour management will each show something a little different,
which is covered in more detail in
why RAL colours look different on every screen.
So the first limit is built in: a hex code is an instruction to a screen, and screens vary.
What a hex code can do
None of this makes hex codes useless. They are the right tool for quite a few jobs.
- Websites, apps and slides. If a company's vans are painted in a RAL blue and the website should feel related, a hex value is the natural way to carry that colour into the code.
- Mockups and rough visualisation. Dropping an approximate RAL grey onto a photo of a house to see whether the frames should be lighter or darker than the render is a fair use, as long as everyone treats the result as a sketch.
- Communication. "Something near
#373F43" is clearer than "dark grey, not too blue" when two people are looking at the same screen. - Shortlisting. A hex value is a good way to get from a vague colour to three or four RAL numbers worth ordering as physical samples.
The common thread is that all of these stay on a screen or end with someone holding a real sample.
What a hex code cannot do
A hex code cannot be mixed. No paint counter can take #1D4E89 and produce a formula from it with any authority,
because the number does not say what the colour looks like on a surface, under a light, at a gloss level. Some
mixing systems will accept an RGB value and suggest a recipe, but that recipe is a guess at a guess.
It cannot carry finish. A matt wall and a high gloss door in the same RAL number look different, and a hex code has no way to describe either.
It cannot hold effects. Metallic and pearl RAL colours change with viewing angle, and a single flat value cannot show that. Luminous colours sit outside what an ordinary screen can produce at all.
And it cannot settle an argument. If the hex value and the paint disagree, the paint is the thing on the wall. The physical standard, as seen in a fan deck, is the reference; the screen value is a translation of it.
Why charts list different hex values
Look up RAL 7016 on five websites and you may find five hex codes, close but not identical. This surprises people, because they assume one of them is right and the others are wrong. In practice they were all made by someone translating a painted sample into sRGB, and there are several reasonable ways to do that.
One chart might start from published colour measurements, converted through a particular formula and a particular assumed light. Another might come from a scan or photograph of a printed card. A third might have been copied from an older site and rounded along the way. Some charts lift dark colours slightly so they read better on screens; others nudge bright colours back inside the sRGB range in different ways when the original sits outside it.
The values on this site are approximations for screens as well. They are useful for comparing one RAL shade with another on the same display, because they were all produced the same way. They are not a better source of truth than a physical sample, and nobody's hex value is.
A rough sense of scale
The differences between charts are usually small for mid greys and muted colours and larger for strong yellows, oranges, greens and blues, where screens struggle most. For whites they look tiny in numbers but can still matter, because a shift of a few units in the blue channel is the difference between a white that reads warm and one that reads cool.
Worked example: a brand blue
Say a small business has a logo blue, #1D4E89, and wants a sign frame and a trailer painted to sit with it. Here
is how I would work it through.
Step 1: turn the hex into RGB
Split the code into pairs and convert each from base 16.
| Pair | Base 16 | Working | Value |
|---|---|---|---|
| Red | 1D | 1 × 16 + 13 | 29 |
| Green | 4E | 4 × 16 + 14 | 78 |
| Blue | 89 | 8 × 16 + 9 | 137 |
So the brand blue is RGB 29, 78, 137. Blue is the strongest channel by some distance, green sits in the middle and red is low. That already tells you it is a fairly deep, slightly greenish mid blue rather than a violet blue.
Step 2: put it into the match tool
Enter the value in the Match Lab, which compares it against the screen values for every RAL Classic shade on this site and ranks them by a standard colour difference formula (CIEDE2000, often written as Delta E). On the site's values the nearest few come out roughly like this:
| RAL shade | Site hex | Difference from #1D4E89 |
In plain words |
|---|---|---|---|
| RAL 5017 traffic blue | 0E518D | about 1.9 | very close on screen |
| RAL 5005 signal blue | 154889 | about 2.0 | very close on screen |
| RAL 5010 gentian blue | 13447C | about 3.4 | close, a small visible difference |
| RAL 5019 capri blue | 1A5784 | about 4.5 | close, a small visible difference |
Two shades are almost tied at the top. RAL 5017 traffic blue is a touch lighter and cleaner. RAL 5005 signal blue is a little deeper. On a screen the brand blue sits between them.
Step 3: order samples, not paint
This is the point where the hex code has done its job. I would get painted samples of the top two, ideally in the gloss level the trailer will actually have, and hold them next to a printed logo and the logo on a phone screen, in daylight, outside. One of them will look right to the client and the other will not, and the reason will often be something the hex value could never have predicted: the printed logo might be a little warmer than its screen version, or the gloss of the trailer paint might make the deeper blue look nearly black in shade.
Why the nearest is only nearest
A match tool always returns an answer. Give it any hex value and it will list the closest RAL shades, even if the closest is a long way off. The RAL Classic range has roughly 200 colours. That sounds like a lot, but they are spread across the whole range of colour, with gaps between them. A brand colour that falls in a gap will land between two or three RAL shades, and none of them will look the same as the brand colour on a sign.
It helps to read the difference number. Under about 2, most people would struggle to tell the two apart on the same screen. From about 2 to 5 there is a small difference that a careful eye will see side by side. Above 5 or so you are looking at a related colour, not a stand-in. These bands are rough, and they apply to screen values only. Two paints with a small difference on screen can look further apart in daylight, and the reverse also happens.
There is also the question of which values the tool is comparing. Because charts disagree, a brand hex that comes out nearest to one RAL number on this site might come out nearest to its neighbour on another site. When the top two are as close as traffic blue and signal blue in the example, treat them as joint candidates and let the samples decide.
If none of the near shades is close enough, RAL Classic may simply not have the colour. A paint supplier can usually mix to a physical sample instead: a printed brand swatch, a painted panel or a piece of the thing you want to match. That route works from a real object, not from a hex value.
Going the other way
People also ask for the hex value of a RAL number, usually for a website or a presentation. That is a fair request, and the colour pages on this site list an approximate hex and RGB for each shade. Use the value consistently across the project, note which chart it came from, and do not be alarmed if another chart differs a little. If the colour needs to match painted signs or vehicles closely in photographs, it can be worth adjusting the screen value by eye, on a decent monitor, while looking at a real sample beside it.
A short checklist before anyone orders
- Write down where the hex code came from: a brand guide, a website, a screenshot.
- Convert it to RGB and look at the balance of the channels, so you know roughly what kind of colour it is.
- Find the nearest three or four RAL shades and note the difference numbers.
- Order physical samples of the closest two, in the gloss you plan to use.
- Judge them outdoors in daylight next to whatever the colour has to sit with.
- Order paint by RAL number and gloss level, never by hex value.

Lotte Brandsma
Lotte writes about the gap between a colour code and the colour you see: screens, print, fan decks and the NCS and hex numbers people mix up. She lives in Utrecht and keeps a well-thumbed fan deck beside the keyboard.



