Guide

How to Search and Use the CSS Color Names Reference

Enter a color name or hexadecimal value to search the built-in named-color collection. A valid six-character hexadecimal query with no direct match can also return a nearest named color.

Tool CSS Color Names Reference

Use this reference when you have a color name, a hexadecimal value, or an uncertain six-digit hexadecimal value and want to search the tool’s built-in collection of named colors. It can find direct matches by name or hexadecimal value, and it can offer nearest-color information for qualifying hexadecimal queries that do not directly match.

The result is useful for checking which named colors correspond to a search and for reviewing each match’s color representation. A result includes the color name, a lowercase six-digit hexadecimal value beginning with #, and three integer RGB channel values.

How to search and read the results

  1. Enter a color name or hexadecimal value in the search field. The search is optional, so you can also leave it empty.

  2. Submit the search. Before matching, the tool converts the supplied value to lowercase and removes whitespace from the beginning and end. For a nonempty search, a color matches when the normalized text appears within its name or exactly equals that color’s generated lowercase hexadecimal representation.

  3. Review the returned color entries. Each matching entry shows its name, lowercase six-digit hexadecimal value with a leading #, and three integer RGB channel values.

  4. If there is no direct match, check whether your query is a six-character hexadecimal value, with or without a leading #. In that case, the tool removes the optional # and selects a nearest named color using squared distance across the red, green, and blue channel values.

  5. If you leave the search empty, no name or hexadecimal filter is applied, and the collection is processed in alphabetical order by color name. Use this view when you want to browse rather than narrow the collection.

How to interpret the result

A direct result means the normalized query matched a color name or exactly matched a generated hexadecimal representation. A nearest-color result has a different meaning: the query produced no direct match, but it was a valid six-character hexadecimal value after an optional leading # was removed. Treat that entry as the selected nearest named color, not as proof that the queried value has that name.

A name search can return more than one entry when the text occurs within multiple color names. A hexadecimal search must match the generated six-digit representation exactly to count as a direct match. A malformed or differently formatted value does not receive nearest-color fallback when it is not valid after the optional # is removed.

If computation raises an exception, the tool returns an unsuccessful result containing the exception text. That outcome is separate from a normal no-match result.

Worked example

You are checking an unfamiliar six-digit hexadecimal value and want to see whether it maps directly to a named color or receives a nearest-color result.

Enter #A1B2C3, submit the search, and inspect whether the value directly matches a generated hexadecimal representation or instead produces nearest-color information.

The result contains one or more color entries, each with a color name, a lowercase six-digit hexadecimal value prefixed with #, and three integer RGB channel values. If there is no direct match and the value is valid, the result includes a selected nearest named color.

Limitations

  • Nearest-color information is limited to valid six-character hexadecimal queries, and the reference covers the built-in named-color collection described by the tool.

Common errors

  • Mistake: expecting a nearest color for a value that is not six valid hexadecimal characters after the optional # is removed. Correction: check the query format before relying on nearest-color information; invalid no-match queries do not receive that fallback.

FAQ

Can I search with a hex color?

Yes, if it is a valid six-character hexadecimal value after an optional leading # is removed. When no direct match exists, the tool selects a nearest named color using RGB-channel distance.

Does the search ignore capitalization and outside spaces?

The query is converted to lowercase and surrounding whitespace is removed before matching, so capitalization and extra spaces at the ends do not affect the normalized search.

What happens if I search with an empty field?

Leave the search empty to apply no name or hexadecimal filter. The collection is then processed in alphabetical order by color name.

Tool

CSS Color Names Reference