Hex Colour to Name Converter NZ
This tool finds the nearest named CSS colour to any hex colour you choose, matching your shade to the closest standard colour name. CSS defines around 140 named colours, words like tomato, steelblue and gold, that map to specific hex values, and it is often useful to know which named colour is closest to a particular shade: for readable code, for describing a colour in words, for picking a recognisable name near your brand colour, or simply out of curiosity about what a hex value would be called. Because most hex colours do not exactly match a named one, the tool finds the closest. You choose a colour, and the calculator compares it against the full set of named CSS colours, measuring the distance in colour space, and returns the nearest name, its hex value, and how close the match is, along with a swatch of each so you can see them side by side. The results update as you change the colour. Use it to name a colour, to find a recognisable named colour near a custom one, to write more readable CSS, or to explore the named palette. The matching works by treating each colour as a point defined by its red, green and blue components and finding the named colour with the smallest distance to yours, the standard way to measure colour similarity. The closer the match, the more your colour resembles a standard named one; a distant match means your shade sits between named colours with no close equivalent. While exact hex values give precise control, named colours are easier to read and remember, so finding the nearest name is handy when communicating about colour or choosing a memorable approximation. The result is the single closest CSS colour name, which you can use directly in your stylesheets.
Compares your colour against the ~140 named CSS colours by RGB distance and returns the closest. Most hex colours fall between named ones, so the match is the nearest, not exact.
How it works
Your colour is split into its red, green and blue components. The calculator measures the distance between your colour and each named CSS colour, treating them as points in colour space, and finds the one with the smallest distance. That nearest named colour, its hex value and a measure of how close it is are returned.
Worked example
For a mid-blue such as #2f6fb0, the calculator compares it against every named CSS colour and finds steelblue, hex #4682B4, as the closest match. The two shades sit near each other in colour space, so it is a close match, shown with swatches of both your colour and steelblue side by side.
Related calculators
- Colour Converter: HEX, RGB, HSL.
- Colour Palette: tints and shades.
- Colour Contrast: accessibility.
- CSS Gradient: gradient code.