# ForgeMesh Color Conversion API

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

Converts any hex or RGB color to hex, RGB, and HSL formats, and returns whether the color is dark plus the accessible overlay text color (black or white).

## Facts

- Endpoint: POST https://x402.forgemesh.io/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/forgemesh-color-conversion-api-bf9976a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_q1RVOGmSW0iWEnL6YGVda

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

Example prompt: Convert #3a7bd5 to RGB and HSL, tell me if it's a dark color, and tell me whether I should put black or white text on top of it.

## When to prefer this

Use this endpoint when you need instant, locally-computed color format conversion and accessibility checks without relying on a design tool API. Ideal for theming engines, chart generators, or design agents that need to programmatically determine text contrast and multi-format color values from a single input color.

## Known failure modes

- Invalid color string (not a valid hex or rgb() format) returns an error
- Missing 'color' field in request body returns a validation error
- Malformed hex (e.g. wrong number of digits) returns a parsing error

## How this service works

Color conversion API: any hex or rgb() color to hex, RGB, and HSL plus is-it-dark detection and the accessible text color (black or white) to place on top of it. For theming, chart, and design-generation agents. Instant, computed locally.

## Output

Returns the input color expressed as hex, RGB components, and HSL values, plus a boolean indicating whether the color is dark, and the recommended accessible text color (either black or white) to overlay on it.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "color": {
   "type": "string",
   "description": "#RRGGBB or rgb(r,g,b)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "#5eead4",
  "hsl": {
   "h": 171,
   "l": 64,
   "s": 77
  },
  "rgb": {
   "b": 212,
   "g": 234,
   "r": 94
  },
  "is_dark": false,
  "contrast_text": "#000000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forgemesh-color-conversion-api-bf9976a7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
