# Foundry Color Converter

> Foundry Color Converter is a paid API for AI agents from minty-sprout.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-01).

Converts a color (hex, RGB, HSL, or basic name) and returns all formats, luminance, contrast ratios against white and black, and the best readable text color overlay.

## Facts

- Endpoint: POST https://minty-sprout.onrender.com/v1/color-convert?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-color-converter-6e1d5b04
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zM2uLmkXhrf6sBk25te4v

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 foundry-color-converter-6e1d5b04 -d '<json body>'
```

Example prompt: Convert the color #1e90ff and tell me its RGB and HSL values, its luminance, and whether black or white text would be more readable on top of it.

## When to prefer this

Choose this endpoint when you need to programmatically convert colors between formats (hex/RGB/HSL), compute WCAG luminance or contrast ratios for accessibility checks, or determine the best readable text color (black vs white) to overlay on a given background color. It handles all common CSS color input formats in a single call.

## Known failure modes

- Invalid or unparseable color input returns an error (e.g. malformed hex, out-of-range RGB values)
- Missing input field returns a validation error
- Network timeout if the Render.com host is cold-starting
- Unsupported color name not in the basic color name set may fail to parse

## How this service works

Color converter: hex, RGB and HSL, luminance, contrast against white and black, best text color. Input: '#1e90ff'.

## Output

Returns a JSON object with the color expressed in hex, RGB, and HSL formats, its relative luminance (0–1), contrast ratio against black, contrast ratio against white, and the recommended best text color (#000000 or #ffffff) for legibility.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 8000,
   "description": "#hex, rgb(r,g,b), hsl(h,s%,l%) or a basic name"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "#1e90ff",
  "hsl": "hsl(210, 100%, 56%)",
  "rgb": "rgb(30, 144, 255)",
  "luminance": 0.2744,
  "best_text_color": "#000000",
  "contrast_vs_black": 6.49,
  "contrast_vs_white": 3.24
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-color-converter-6e1d5b04/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from minty-sprout.onrender.com](https://www.zero.xyz/host/minty-sprout.onrender.com/llms.txt)
