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.
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.
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.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
© 2019 to 2026 Calculate.co.nz. All rights reserved.