# Relaystation Color Convert

> Relaystation Color Convert is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Converts color values between hex, RGB, and HSL formats, returning exact converted values as JSON

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/codes/color-convert
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-color-convert-b1c1a2e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x8AeeoPVX7zsroF5B9guu

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 relaystation-color-convert-b1c1a2e4 -d '<json body>'
```

Example prompt: Convert the hex color #3A86FF to both RGB and HSL and give me the exact values.

## When to prefer this

Choose this endpoint when you need fast, exact, programmatic color format conversion between hex, RGB, and HSL with structured JSON output. Ideal for design automation pipelines, CSS preprocessing, theming tools, or any agent workflow that needs to normalize color representations at very low cost ($0.0002/call). Prefer this over extracting dominant colors from images (a separate endpoint) or any visual analysis task.

## Known failure modes

- Invalid color value format returns an error response
- Out-of-range RGB values (e.g. 256) may cause validation failure
- Malformed hex string (wrong length or non-hex characters) returns parsing error
- Missing required input fields result in a 400-level error
- Payment failure or insufficient credits returns a payment-required error

## How this service works

$0.0002/call. Convert colors between hex, RGB, and HSL — exact values back as JSON. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

A JSON object containing the color represented in all three formats: hex (e.g. '#3A86FF'), RGB (e.g. {r: 58, g: 134, b: 255}), and HSL (e.g. {h: 217, s: 100, l: 61}), regardless of which format was provided as input.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "color": {
       "type": "string",
       "minLength": 1,
       "description": "Any recognized hex/rgb()/hsl() form (incl. alpha)."
      },
      "to": {
       "type": "string",
       "enum": [
        "hex",
        "rgb",
        "hsl"
       ]
      }
     }
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-color-convert-b1c1a2e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
