Docs/APIs/Color Name Finder

Color Name Finder

Find closest named color from hex value

OperationalCredits 1 per callp50 368msReference DataStar

Overview

Color Name Finder works by calculating the color distance between the input hex color and all CSS/HTML named colors, ranking them by similarity and providing multiple closest matches with detailed color information.

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

GEThttps://api.apiverve.com/v1/colornamefinder
curl "https://api.apiverve.com/v1/colornamefinder?hex=FF5733&closest=3" \
  -H "x-api-key: your_api_key_here"
const res = await fetch('https://api.apiverve.com/v1/colornamefinder?hex=FF5733&closest=3', {
  headers: { 'x-api-key': 'your_api_key_here' },
});

if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);

const { data } = await res.json();
console.log(data);
import requests

res = requests.get(
    "https://api.apiverve.com/v1/colornamefinder?hex=FF5733&closest=3",
    headers={"x-api-key": "your_api_key_here"},
    timeout=15,
)
res.raise_for_status()

print(res.json()["data"])
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/colornamefinder?hex=FF5733&closest=3", nil)
	req.Header.Set("x-api-key", "your_api_key_here")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
hexRequiredstringHex color value (with or without # prefix)
hexColor
closestOptionalPremiumintegerNumber of closest color matches to return
default 1 · range 1–20

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "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
        }
      },
      {
        "name": "Coral",
        "hex": "FF7F50",
        "distance": 49.41,
        "similarity": 88.81,
        "rgb": {
          "r": 255,
          "g": 127,
          "b": 80
        }
      },
      {
        "name": "Chocolate",
        "hex": "D2691E",
        "distance": 52.82,
        "similarity": 88.04,
        "rgb": {
          "r": 210,
          "g": 105,
          "b": 30
        }
      }
    ],
    "total_named_colors": 141
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
input_hexstring"#FF5733"The hex color value provided as input
input_rgbobject{...}RGB color values decomposed from input hex
rnumber255Red component value from input
gnumber87Green component value from input
bnumber51Blue component value from input
exact_matchbooleanfalseWhether the input matches a named color exactly
closest_colorobject{...}Best matching named color with distance metrics
namestring"Tomato"Name of the closest matching color
hexstring"FF6347"Hex code of the closest matching color
distancePremiumnumber23.32Euclidean distance metric in RGB space
similarityPremiumnumber94.72Similarity percentage of closest match
rgbobject{...}RGB values of the closest matching color
rnumber255Red component of closest color
gnumber99Green component of closest color
bnumber71Blue component of closest color
closest_matchesPremiumarray[3]Array of top matching colors with metrics
namePremiumstring"Tomato"Name of matched color in results
hexPremiumstring"FF6347"Hex code of matched color result
distancePremiumnumber23.32Color distance metric for match result
similarityPremiumnumber94.72Similarity percentage for match result
rgbPremiumobject{...}RGB values of matched color result
rPremiumnumber255Red component of result match
gPremiumnumber99Green component of result match
bPremiumnumber71Blue component of result match
total_named_colorsnumber141Total count of available named colors

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

Use cases

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

Other ways to use Color Name Finder

Set up Color Name Finder on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKitReference →
Use it in Google Sheets or ExcelA =VERVE() formula fills a column — no script, no export, recalculates in place.VerveSheetsReference →
Ground an agent on itA cited, machine-checkable fact your model can't produce on its own.VerveContextReference →

More in Reference Data:

Was this page helpful?