# PennyRail CSS Color Converter

> PennyRail CSS Color Converter is a paid API for AI agents from pennyrail.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Converts a CSS color value between hex (#RRGGBB), RGB (rgb(r,g,b)), and HSL (hsl(h,s%,l%)) formats

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/bazaar/color-convert
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pennyrail-css-color-converter-90808968
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Dqb2jVTRTWPS4zTJCUFnl

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 pennyrail-css-color-converter-90808968 -d '<json body>'
```

Example prompt: Can you convert #FF5733 to both RGB and HSL for me?

## When to prefer this

Use this endpoint when you need a simple, programmatic CSS color format conversion between hex, RGB, and HSL without setting up a local parsing library. It is ideal for agents operating in web design, CSS generation, or design-token pipelines where colors arrive in one format and are needed in another. At $0.001 per call, it suits low-volume on-demand conversions rather than batch processing thousands of colors locally.

## Known failure modes

- Invalid or unrecognized color string format returns an error response
- Out-of-range RGB values (e.g. negative or >255) cause a validation error
- Missing or malformed request body results in a 400-level error
- Malformed HSL percentages (e.g. missing % sign) may cause a parse failure
- Payment not included or insufficient USDC balance causes a 402 Payment Required response

## How this service works

Convert a CSS color between hex, RGB and HSL. Accepts #RRGGBB, rgb(r,g,b), hsl(h,s%,l%) or numeric RGB fields. Exact-match PennyRail gap-arbitrage route.

## Output

The endpoint returns the input color converted into all three CSS color representations: hex (#RRGGBB), RGB (rgb(r,g,b)), and HSL (hsl(h,s%,l%)), allowing the caller to use whichever format is needed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "description": "Input for Color convert.",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-css-color-converter-90808968/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyrail.vercel.app](https://www.zero.xyz/host/pennyrail.vercel.app/llms.txt)
