# Delx Hex Color Luminance

> Delx Hex Color Luminance is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the relative luminance of a hex color value (#RRGGBB) and returns a float between 0 and 1.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/hex-color-luminance
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-hex-color-luminance-5690f270
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tiKl4ccYc0rEGenQVMkT0

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 delx-hex-color-luminance-5690f270 -d '<json body>'
```

Example prompt: What's the relative luminance of the hex color #1A2B3C? I need to check if it's dark enough for contrast compliance.

## When to prefer this

Choose this endpoint when you need a fast, single-call luminance value for a specific hex color — especially for accessibility checks, contrast ratio computation, or deciding between light and dark foreground text. It is simpler and cheaper than full color-analysis APIs when all you need is the scalar luminance float.

## Known failure modes

- Invalid or malformed hex string (missing #, wrong length, non-hex characters) — likely returns a 4xx error
- Missing 'hex' field in request body — likely returns a 400 validation error
- Hex shorthand (e.g. #FFF instead of #FFFFFF) may not be supported — use full 6-digit form

## How this service works

Relative luminance of a #RRGGBB color. Call when contrast checks without image decode. Returns luminance as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a JSON object with a schema identifier ('delx/util-hex-color-luminance/v1') and a 'luminance' field containing a float between 0 (absolute black) and 1 (absolute white) representing the relative luminance of the input hex color per WCAG standards.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "hex": {
   "type": "string",
   "description": "Hex color #RRGGBB"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-hex-color-luminance/v1",
  "luminance": 0.01502241942073589
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-hex-color-luminance-5690f270/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
