# Random Color Generator with Saturation and Lightness Constraints

> Random Color Generator with Saturation and Lightness Constraints 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).

Generates one or more random colors (hex, RGB, HSL) with optional saturation and lightness constraints for pleasant or vibrant output

## Facts

- Endpoint: GET https://api.x402node.dev/color/random
- 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-39134e45
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hc0RYzH-8W-z_Vg3zeaaq

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-39134e45
```

Example prompt: Give me 5 random colors that look vibrant and pleasant — high saturation, somewhere between medium and bright lightness — and return them as hex codes.

## When to prefer this

Use this endpoint when you need one or more random colors programmatically — especially when you want to constrain saturation or lightness to ensure pleasant, pastel, or vibrant output rather than getting arbitrary muddy colors. Prefer over manual color picking when building palettes, UI mockups, or generative art pipelines that need randomness with aesthetic guardrails.

## Known failure modes

- Invalid count parameter (non-integer or negative) returns 400 error
- Saturation or lightness range values out of 0-100 bounds may return validation error
- Payment failure or insufficient USDC balance returns 402 Payment Required
- Server-side generation error returns 500

## How this service works

Random color generator, random hex, random RGB, random HSL, color picker, batch colors, pleasant random color, vibrant colors. Generate one or more random colors with optional saturation and lightness constraints. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object containing a 'colors' array with one or more random color entries, each including hex, RGB, and/or HSL representations, potentially filtered by saturation and lightness constraints.

## 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",
     "properties": {
      "count": {
       "type": "string",
       "description": "Count (optional)"
      },
      "lightness": {
       "type": "string",
       "description": "Lightness (optional)"
      },
      "saturation": {
       "type": "string",
       "description": "Saturation (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-39134e45/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)
