# Color Name Finder API

> 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.

**Endpoint:** `GET https://api.apiverve.com/v1/colornamefinder`  
**Category:** Reference Data  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/colornamefinder

## Overview

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.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/colornamefinder?hex=FF5733&closest=3" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `hex` | string | Yes | Hex color value (with or without # prefix). hexColor |
| `closest` | integer | No | Number of closest color matches to return. default 1. range 1-20. Premium field |

## Response fields

- `input_hex` — string · The hex color value provided as input
- `input_rgb` — object · RGB color values decomposed from input hex
  - `input_rgb.r` — number · Red component value from input
  - `input_rgb.g` — number · Green component value from input
  - `input_rgb.b` — number · Blue component value from input
- `exact_match` — boolean · Whether the input matches a named color exactly
- `closest_color` — object · Best matching named color with distance metrics
  - `closest_color.name` — string · Name of the closest matching color
  - `closest_color.hex` — string · Hex code of the closest matching color
  - `closest_color.distance` — number · Euclidean distance metric in RGB space · (premium)
  - `closest_color.similarity` — number · Similarity percentage of closest match · (premium)
  - `closest_color.rgb` — object · RGB values of the closest matching color
    - `closest_color.rgb.r` — number · Red component of closest color
    - `closest_color.rgb.g` — number · Green component of closest color
    - `closest_color.rgb.b` — number · Blue component of closest color
  - `closest_matches.0.name` — string · Name of matched color in results · (premium)
  - `closest_matches.0.hex` — string · Hex code of matched color result · (premium)
  - `closest_matches.0.distance` — number · Color distance metric for match result · (premium)
  - `closest_matches.0.similarity` — number · Similarity percentage for match result · (premium)
  - `closest_matches.0.rgb` — object · RGB values of matched color result · (premium)
    - `closest_matches.0.rgb.r` — number · Red component of result match · (premium)
    - `closest_matches.0.rgb.g` — number · Green component of result match · (premium)
    - `closest_matches.0.rgb.b` — number · Blue component of result match · (premium)
- `total_named_colors` — number · Total count of available named colors

## Sample response

```json
{
  "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
  }
}
```

## 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

## SDKs

- **npm** — `npm install @apiverve/colornamefinder` (https://www.npmjs.com/package/@apiverve/colornamefinder)
- **NuGet** — `dotnet add package APIVerve.API.ColorNameFinder` (https://www.nuget.org/packages/APIVerve.API.ColorNameFinder)
- **Source** — https://github.com/apiverve/colornamefinder-api

## More

- Full reference: https://docs.apiverve.com/ref/colornamefinder
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
