# Hex to RGB Color Converter

> Hex to RGB Color Converter is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-14).

Converts hex color codes (#FF0000, #F00, FF0000) into RGB integer values and a CSS rgb() string

## Facts

- Endpoint: GET https://api.x402node.dev/color/hex-to-rgb
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-282392a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KiyG1OFyIVPUFRb2bJ60D

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 api-x402node-dev-282392a4
```

Example prompt: Convert the hex color #1A9BF0 into its RGB values and give me the CSS rgb() string for it.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically convert a hex color code into its RGB integer components or a CSS rgb() string, especially in web design, UI automation, color analysis, or dynamic styling workflows where downstream systems expect RGB format rather than hex.

## Known failure modes

- Invalid or malformed hex code returns an error (e.g. wrong length, non-hex characters)
- Missing input hex value results in a 400-level error
- Hex code without '#' prefix may or may not be accepted depending on parsing rules
- Network or payment-related failures (x402 payment required) if USDC is not provided

## How this service works

Hex to RGB converter, color converter, hex color parser, #FF0000 to rgb, 3-digit hex, 6-digit hex, web color decode. Convert hex color codes (#FF0000, FF0000, #F00) into RGB integer values and CSS rgb() string.

## Output

Returns an object containing the RGB integer values (r, g, b components 0-255) and a formatted CSS rgb() string derived from the input hex color code.

## Example request

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

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "hex"
     ],
     "properties": {
      "hex": {
       "type": "string",
       "description": "Hex color e.g. #3366cc (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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