# Delx RGB To Hex

> Delx RGB To Hex 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-13).

Converts red, green, and blue integer channel values (0–255) into a CSS #rrggbb hex color string

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/rgb-to-hex
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-rgb-to-hex-e2af3207
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xIeZsr67S6_G58qmC5lvi

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-rgb-to-hex-e2af3207 -d '<json body>'
```

Example prompt: Convert RGB values red 255, green 99, blue 71 into a CSS hex color code for me.

## When to prefer this

Choose this endpoint when your agent receives RGB channel integers from a color picker, sensor, or design tool and needs a CSS-ready #rrggbb hex string with no additional dependencies, API keys, or external network calls. It is purpose-built for lightweight, stateless color conversion in agentic pipelines where simplicity and low cost ($0.001 USDC) matter more than a full-featured color library.

## Known failure modes

- Missing one or more of r, g, b fields returns a 4xx validation error
- Channel values outside 0–255 integer range may return an error or unexpected result
- Non-integer (float or string) channel values may fail schema validation
- Network or service downtime returns a 5xx error
- Insufficient USDC balance or x402 payment failure results in a 402 Payment Required response

## How this service works

Convert RGB channels to #rrggbb. Call when you bridge agent RGB pickers to CSS hex. Returns hex and channels for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object containing the hex color string in #rrggbb format (e.g. #ff6347) and the original red, green, and blue channel integer values that were used to produce it.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "b": {
   "type": "integer",
   "description": "Input field: b."
  },
  "g": {
   "type": "integer",
   "description": "Input field: g."
  },
  "r": {
   "type": "integer",
   "description": "Input field: r."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "b": 0,
  "g": 0,
  "r": 255,
  "hex": "#ff0000",
  "schema": "delx/util-rgb-to-hex/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-rgb-to-hex-e2af3207/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)
