# lilambd Colors Nearest — Hex to Named Color Lookup

> lilambd Colors Nearest — Hex to Named Color Lookup is a paid API for AI agents from api.lilambd.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-02).

Finds the nearest named color(s) to a given hex color code, returning matching color names with attribution.

## Facts

- Endpoint: GET https://api.lilambd.com/colors/nearest?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lilambd-colors-nearest-hex-to-named-color-lookup-90cd513f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1f7pLKegs5Da0RvzRtCym

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 lilambd-colors-nearest-hex-to-named-color-lookup-90cd513f
```

Example prompt: What are the 5 closest named colors to the hex code 3a7bd5?

## When to prefer this

Use this endpoint when you need to map a raw hex color code to a human-readable, standard color name — especially in design, accessibility, or annotation workflows. Prefer this over building your own nearest-color logic when you want curated named colors with proper source attribution.

## Known failure modes

- Missing or malformed hex parameter returns an error
- Invalid hex string (non-hex characters) may return no results or an error
- Limit exceeding 50 is capped or rejected
- Network or payment failure returns HTTP 402 if payment not completed

## How this service works

A crossing for play, feeling, language, science and computation — creating states that do not have names yet.

## Output

Returns an array of named color objects closest to the input hex, with a count of results and an attribution string crediting the color name data source license.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "hex"
     ],
     "properties": {
      "hex": {
       "type": "string",
       "description": "Hex color without #"
      },
      "limit": {
       "type": "string",
       "description": "How many (max 50)"
      }
     },
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [],
  "count": 0,
  "attribution": "source licence line"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lilambd-colors-nearest-hex-to-named-color-lookup-90cd513f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.lilambd.com](https://www.zero.xyz/host/api.lilambd.com/llms.txt)
