# HALOWERK Medien Image Colour Palette Extractor

> HALOWERK Medien Image Colour Palette Extractor is a paid API for AI agents from medien.halowerk.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-16).

Extracts a perceptually accurate colour palette (up to 16 colours) from an image, returning HEX, sRGB, OKLCH values, area coverage percentages, and WCAG 2.1 contrast ratios

## Facts

- Endpoint: POST https://medien.halowerk.com/v1/image-palette?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-medien-image-colour-palette-extractor-9adacaa1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MtfioOtav7ldnwboR8Qpc

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 halowerk-medien-image-colour-palette-extractor-9adacaa1 -d '<json body>'
```

Example prompt: Can you extract the colour palette from this image — https://example.com/brand-photo.jpg — give me up to 8 colours with their hex codes, OKLCH values, and area coverage percentages, and include the WCAG contrast ratios so I can check accessibility?

## When to prefer this

Choose this endpoint when you need perceptually accurate colour extraction that respects how the human eye perceives colour differences — using OKLab clustering rather than RGB, so it won't conflate dark blue with black or split visually identical yellows. It is especially valuable when you also need WCAG 2.1 accessibility contrast data alongside the palette, or when you need OKLCH coordinates for modern CSS colour workflows. Prefer it over generic colour quantization tools when perceptual accuracy and accessibility compliance data matter.

## Known failure modes

- Image URL is unreachable or returns a non-image response — endpoint cannot fetch source
- base64 payload exceeds 12MB limit — request rejected
- Both url and content_base64 provided simultaneously — validation error
- max_colors set outside 2–16 range — validation error
- min_share_pct set outside 0–50 range — validation error
- Image format not supported — processing failure
- Network timeout fetching remote image URL

## How this service works

Takes an image by URL or inline base64 and returns its colour palette: up to sixteen colours, each with the share of the visible area it covers, its HEX and sRGB values, its OKLCH coordinates, and the WCAG 2.1 contrast ratio against white, against black and against every other colour in the palette. The grouping runs in OKLab rather than RGB, because distance in RGB does not match what an eye sees — it merges dark blue with black and splits two yellows nobody tells apart.

## Output

Returns a palette of up to 16 colours (may be fewer if clusters fall below the minimum share threshold), each with: HEX code, sRGB triplet, OKLCH coordinates, percentage share of the visible image area, WCAG 2.1 contrast ratio against white, WCAG 2.1 contrast ratio against black, and (if requested) a full pairwise contrast ratio matrix between every colour in the palette. Also reports the number of clusters that were merged due to being below the minimum share threshold.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "source": {
   "type": "object",
   "properties": {
    "url": {
     "type": "string",
     "maxLength": 2048,
     "description": "Public http(s) URL of the image."
    },
    "filename": {
     "type": "string",
     "maxLength": 260
    },
    "content_base64": {
     "type": "string",
     "maxLength": 12000000,
     "description": "The image inline, base64."
    }
   },
   "description": "The image. Either url or content_base64, not both.",
   "additionalProperties": false
  },
  "max_colors": {
   "type": "integer",
   "default": 6,
   "maximum": 16,
   "minimum": 2,
   "description": "Upper bound on palette size. Clusters whose share falls below min_share_pct are merged into their nearest neighbour, so the answer can contain fewer."
  },
  "min_share_pct": {
   "type": "number",
   "default": 1,
   "maximum": 50,
   "minimum": 0,
   "description": "Minimum area share in percent for a colour to stay in the palette. Below this it is merged into the perceptually nearest remaining colour and counted under merged_clusters."
  },
  "include_contrast": {
   "type": "boolean",
   "default": true,
   "description": "Return WCAG 2.1 contrast ratios: against white and black per colour, and the full pairwise matrix."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-medien-image-colour-palette-extractor-9adacaa1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from medien.halowerk.com](https://www.zero.xyz/host/medien.halowerk.com/llms.txt)
