NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Color Name Finder API

GET

Match any hex color to its closest CSS name.

Color Name Finder matches any hex color code to its closest named CSS color. Send a hex value to get the matching color name, RGB coordinates, and an exact match flag.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/colornamefinder?hex=FF5733
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "input_hex": "#FF5733",
    "input_rgb": {
      "r": 255,
      "g": 87,
      "b": 51
    },
    "exact_match": false,
    "closest_color": {
      "name": "Tomato",
      "hex": "FF6347",
      "distance": 23.32,
      "similarity": 94.72,
      "rgb": {
        "r": 255,
        "g": 99,
        "b": 71
      }
    },
    "closest_matches": [
      {
        "name": "Tomato",
        "hex": "FF6347",
        "distance": 23.32,
        "similarity": 94.72,
        "rgb": {
          "r": 255,
          "g": 99,
          "b": 71
        }
      }
    ],
    "total_named_colors": 141
  }
}

About the Color Name Finder API

A color name API that turns any hex code into the nearest CSS/HTML named color. Send FF5733 and get back Tomato, along with its hex code, its RGB values and a flag saying whether your input was an exact match. It is the quick way to put a human-readable label on a color a user picked, a pixel you sampled, or a value pulled from a stylesheet.

Typical uses are color pickers that show a name next to the swatch, product catalogs that need a searchable color word, design-token tooling, and accessibility features that read a color aloud instead of a hex string.

The Free plan returns the single closest named color and the exact-match flag. Paid plans add the color distance and a similarity percentage for the match, and let you ask for a ranked list of up to 20 closest matches, which is useful when the nearest name is a poor fit and you want to offer alternatives.

How it works

Color Name Finder compares the input against a fixed list of 141 CSS named colors, the number reported in total_named_colors. The hex parameter accepts 3-, 6- or 8-digit hex with or without #; shorthand is expanded and an 8-digit value's alpha pair is ignored. The parsed channels come back as input_rgb.

For each named color the API computes the straight-line Euclidean distance between the two colors in RGB space, the square root of the summed squared channel differences. distance is that value rounded to two decimals, from 0 for an identical color up to about 441.67 for black against white. similarity rescales it to a percentage: 100 minus distance as a share of 441.67, also rounded to two decimals. The list is then sorted by distance, nearest first. exact_match is true only when the nearest distance is exactly 0.

closest_color is the top entry, with name, hex (six digits, no #) and rgb. closest_matches holds the top N entries, where N is the closest parameter, from 1 to 20 with a default of 1. The CSS list contains duplicate values, such as Aqua and Cyan or Fuchsia and Magenta, so two entries can tie at the same distance and appear side by side.

RGB distance is simple and predictable but does not model human perception evenly, so two colors that look close can sit further apart than two that look different. On the Free plan the closest parameter is ignored, and distance, similarity and the closest_matches array are removed.

What people use it for

Design Tools
Identify and name colors in design applications and color pickers
Accessibility
Convert hex colors to named colors for better communication and documentation
Web Development
Find CSS color names for hex values to improve code readability
Color Analysis
Analyze and categorize colors in images and designs with standard color names

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Color Name Finder

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Color Name Finder API.

Read the docs →
What color catalog does it match against?
It matches against the full set of standard CSS and HTML named colors. The service calculates color distance across RGB space to identify the nearest named color and reports whether the match is exact.
Do hex values need a leading hash symbol?
No, both formats work. You can provide hex strings either with the leading # prefix or without it. The input is parsed and decomposed into its red, green, and blue components before matching.
Are similarity scores and alternative matches included on the Free plan?
No. The Free plan returns the single closest named color, its hex, RGB values, and exact match status. Distance metrics, similarity percentages, and returning a ranked list of multiple closest matches require a paid plan.
Is it cheap enough to name colors for every user palette?
Yes. Each lookup costs 1 credit. The Starter plan provides 200,000 lookups a month, which works out to about $0.00015 per call or $0.15 per 1,000 lookups. The Free plan includes 200 lookups each month.
Can I use the returned color names in a commercial design tool?
Yes, once you are on a paid plan. Commercial use is permitted across all paid tiers, so you can display names and color data inside your application. You may not resell or redistribute the raw color matching data as a standalone dataset.

Ready to build with Color Name Finder? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs