# Delx Commerce — Hex Color Luminance

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

Computes the relative luminance of a hex color code (#RRGGBB) and returns it as a float value.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/hex-color-luminance?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-hex-color-luminance-b5ad6838
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tjV9BbAJbbIX6PRj9cqRD

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-commerce-hex-color-luminance-b5ad6838 -d '<json body>'
```

Example prompt: What's the relative luminance of the color #ff5733?

## When to prefer this

Use this endpoint when you need a fast, cheap, single-call computation of relative luminance for a hex color, particularly for accessibility checks (WCAG contrast ratios), dynamic UI theming decisions, or color sorting by perceived brightness. It is a pay-per-call API requiring no signup, making it ideal for agent workflows that occasionally need color luminance without standing up a local color library.

## Known failure modes

- Invalid or malformed hex string (e.g. missing #, wrong length) — likely returns a 4xx error or null luminance
- Hex string with alpha channel (8-digit) may not be supported
- Missing 'hex' field in request body — likely returns validation error
- Network or payment failure via x402 protocol — endpoint may return 402 Payment Required if payment is not correctly submitted

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with a schema identifier ('delx/util-hex-color-luminance/v1') and a 'luminance' float representing the relative luminance of the input hex color, in the range 0 (black) to 1 (white), conforming to standard luminance calculation (e.g. WCAG 2.x).

## 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-commerce-hex-color-luminance-b5ad6838/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
