# x402 Image Tools – Color Palette Extraction

> x402 Image Tools – Color Palette Extraction is a paid API for AI agents from 7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Extracts dominant colors and the average color from an image URL, returning each color as hex and RGB with its share of the image.

## Facts

- Endpoint: GET https://7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws/v1/colors?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-image-tools-color-palette-extraction-cb8cb1af
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Mkwio51FTUYy1QMYwrp0p

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 x402-image-tools-color-palette-extraction-cb8cb1af
```

Example prompt: Can you extract the top 5 dominant colors from this image — https://example.com/photo.jpg — and give me each one as a hex code and RGB value along with how much of the image it covers?

## When to prefer this

Choose this endpoint when you need structured color data (hex, RGB, share) from a remote image URL for use in theming, palette generation, or color-based search indexing. It is purpose-built for color extraction and returns richer metadata (average color + per-color share) than generic image analysis APIs. Prefer it over general vision APIs when you specifically need color palette output without object detection or captioning.

## Known failure modes

- Invalid or inaccessible image URL returns an error
- Image exceeds 20 MB or 40 megapixel limit
- Unsupported image format (only JPEG, PNG, WebP, AVIF, GIF, TIFF, SVG accepted)
- Count parameter outside 1-10 range causes validation error
- Network timeout fetching the remote image
- Payment failure or insufficient USDC balance blocks the request

## How this service works

The dominant colors of an image with their share of it, and its average color, as hex and RGB, for palettes, theming and search.

## Output

A JSON object containing an array of dominant colors (each with hex string, RGB array, and share as a decimal fraction) and the overall average color as a hex string. For example: {"colors":[{"hex":"#2f2a22","rgb":[47,42,34],"share":0.31}],"average":"#7a6b55"}.

## 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": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "https URL of a JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG image (up to 20 MB, 40 megapixels)"
      },
      "count": {
       "type": "integer",
       "description": "how many colors (1-10, default 5)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "colors": {},
      "average": {}
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "colors": [
   {
    "hex": "#2f2a22",
    "rgb": [
     47,
     42,
     34
    ],
    "share": 0.31
   }
  ],
  "average": "#7a6b55"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-image-tools-color-palette-extraction-cb8cb1af/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws](https://www.zero.xyz/host/7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws/llms.txt)
