# Color Conversion API

> Color Conversion API is a paid API for AI agents from api-production-17e1.up.railway.app, paid per call via x402, $0.001/call, status down (last checked 2026-08-24).

Converts any color input (hex, rgb, hsl, or CSS name) into all color representations plus the nearest matching CSS color name

## Facts

- Endpoint: POST https://api-production-17e1.up.railway.app/color
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-08-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/color-conversion-api-b044104c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rnsYwruELCYZCUr4mLmyC

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 color-conversion-api-b044104c -d '<json body>'
```

Example prompt: Convert the color #3B82F6 and give me its hex, RGB, HSL values, and the closest CSS color name.

## When to prefer this

Use this endpoint when you need to normalize a color from any format (hex, rgb, hsl, or CSS name) into all standard representations simultaneously, or when you need to find the closest named CSS color for a given color value — especially useful in design/UI generation workflows or theming pipelines.

## Known failure modes

- Invalid or unrecognized color input format returns an error
- Malformed hex code (wrong length or characters) returns a parsing error
- Empty input returns a validation error
- Unsupported color format returns an error

## How this service works

Color conversion for AI agents — give a color as hex, rgb(), hsl(), or a CSS name → every representation (hex, rgb, hsl) plus the matching/nearest CSS color name. Pay-per-call in USDC via x402 — no signup, no API key. Use for theming, design/UI generation, and normalizing colors.

## Output

Returns all color representations for the input color: hex code, rgb() string, hsl() string, and the matching or nearest CSS color name.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/color-conversion-api-b044104c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api-production-17e1.up.railway.app](https://www.zero.xyz/host/api-production-17e1.up.railway.app/llms.txt)
