# agent402.tools Color Converter

> agent402.tools Color Converter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts a color value between hex, RGB, and HSL color formats

## Facts

- Endpoint: POST https://agent402.tools/api/color
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-color-converter-5dd0f6c5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6GbJDsQ4om6zjb1kVOXgw

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 agent402-tools-color-converter-5dd0f6c5 -d '<json body>'
```

Example prompt: Can you convert the hex color #1a2b3c into its RGB and HSL equivalents for me?

## When to prefer this

Use this endpoint when you need to programmatically convert a color between hex, RGB, and HSL formats — for example, when a design system requires HSL but you only have a hex code, or when normalizing color inputs from different sources. Prefer this over manual calculation or general-purpose code execution when you need a fast, reliable, single-call conversion.

## Known failure modes

- Invalid color string format returns an error (e.g. passing a plain color name like 'red' instead of hex/rgb/hsl syntax)
- Malformed hex string (wrong number of digits) results in a parse error
- Missing 'color' field in request body returns a validation error
- Out-of-range RGB values (e.g. rgb(300,0,0)) may return an error or clamped result

## How this service works

Convert a color between hex, RGB, and HSL. Accepts "#1a2b3c", "rgb(26,43,60)", or "hsl(210,40%,17%)".

## Output

The converted color value(s) in the requested or all alternative formats — e.g. given a hex input, returns the equivalent RGB and HSL representations as structured data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "color": {
   "type": "string",
   "description": "Color in hex, rgb(), or hsl() form"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "#4ade80",
  "hsl": [
   142,
   69,
   58
  ],
  "rgb": [
   74,
   222,
   128
  ],
  "luminance": 0.58
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-color-converter-5dd0f6c5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
