# httpay.xyz Color Converter

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

Converts a hex color code to RGB and HSL values, returning numeric components and CSS-ready strings

## Facts

- Endpoint: POST https://httpay.xyz/api/color-convert
- 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/httpay-xyz-eb0f3a27
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_e2IV6u8TztgslajOYElrT

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 httpay-xyz-eb0f3a27 -d '<json body>'
```

Example prompt: Convert the hex color #FF5733 to its RGB and HSL values so I can use it in my CSS stylesheet.

## When to prefer this

Use this endpoint when you need a lightweight, zero-dependency, instant hex-to-RGB/HSL conversion without importing a full color library. Ideal for agents building CSS, design tools, or any workflow that needs to decompose a hex color into its numeric or CSS-string components on the fly.

## Known failure modes

- Invalid or malformed hex code returns an error
- Missing ?hex parameter causes a bad request response
- Hex code with unsupported format (e.g. 3-digit shorthand ambiguity) may not parse correctly

## How this service works

Convert a hex color code to RGB and HSL values. Pass ?hex=FF5733 (with or without #). Returns r, g, b, h, s, l values and CSS strings. Uses Node.js built-in math. Zero external dependencies.

## Output

Returns numeric r, g, b values (0-255 range), h (0-360), s and l (0-100 percentage), plus formatted CSS strings like rgb(255, 87, 51) and hsl(11, 100%, 60%) ready for use in stylesheets.

## Example request

```json
{
 "hex": "#FF5733"
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "description": "Convert a hex color code to RGB and HSL values. Pass ?hex=FF5733 (with or without #). Returns r, g, b, h, s, l values and CSS strings. Uses Node.js built-in math. Zero external dependencies."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/httpay-xyz-eb0f3a27/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from httpay.xyz](https://www.zero.xyz/host/httpay.xyz/llms.txt)
