# FastX402 Hex Color Name Lookup

> FastX402 Hex Color Name Lookup is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-21).

Converts a hex color code into its closest human-readable CSS/web color name, with an exact-match flag and distance score.

## Facts

- Endpoint: GET https://fastx402.tools/hex-color-name?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-hex-color-name-lookup-6fba5d52
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lb7JldK4Wmav4sKwP7cEn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fastx402-hex-color-name-lookup-6fba5d52
```

Example prompt: What's the human-readable color name for the hex code #FF6347? Tell me if it's an exact match or just the closest named color.

## When to prefer this

Use this endpoint when you need to convert a raw hex color code into a meaningful, human-readable color name — especially useful in design tools, accessibility reports, code reviews, or any UI context where CSS named colors are preferred over hex values. Prefer this over manual lookup tables when you need an approximate nearest-named-color with a distance metric.

## Known failure modes

- Missing or malformed 'hex' query parameter returns an error
- Hex codes with invalid characters or incorrect length may be rejected
- Non-color hex strings (e.g. UUID-like strings) may fail validation
- Payment failure via x402 protocol results in 402 response before processing

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object containing the normalized hex code (e.g. '#ff6347'), the closest named color (e.g. 'tomato'), a boolean indicating whether the match is exact, and an integer distance score (0 = perfect match, higher = less exact).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "hex"
     ],
     "properties": {
      "hex": {
       "type": "string",
       "description": "Hex color code, with or without # prefix (e.g., #FF6347 or FF6347)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "hex": {
       "type": "string"
      },
      "name": {
       "type": "string"
      },
      "exact": {
       "type": "boolean"
      },
      "distance": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "#ff6347",
  "name": "tomato",
  "exact": true,
  "distance": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-hex-color-name-lookup-6fba5d52/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
