Medienwerk
image palette
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.
POST https://medien.halowerk.com/v1/image-paletteEingaben
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| source | object | Ja | The image. Either url or content_base64, not both. |
| max_colors | integer | Nein | 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 | number | Nein | 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 | boolean | Nein | Return WCAG 2.1 contrast ratios: against white and black per colour, and the full pairwise matrix. |
Vollständiges Eingabeschema anzeigen
{
"type": "object",
"required": [
"source"
],
"additionalProperties": false,
"properties": {
"source": {
"type": "object",
"additionalProperties": false,
"description": "The image. Either url or content_base64, not both.",
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"description": "Public http(s) URL of the image."
},
"content_base64": {
"type": "string",
"maxLength": 12000000,
"description": "The image inline, base64."
},
"filename": {
"type": "string",
"maxLength": 260
}
}
},
"max_colors": {
"type": "integer",
"minimum": 2,
"maximum": 16,
"default": 6,
"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",
"minimum": 0,
"maximum": 50,
"default": 1,
"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."
}
}
}Veröffentlichtes Eingabebeispiel
{
"source": {
"content_base64": "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAKklEQVR42mO4aGKBB+l1h+NBDKOaRzUT1CzvtwIPenFECw8a1TyqmaBmACXxCf9EgyxCAAAAAElFTkSuQmCC",
"filename": "beispiel.png"
},
"max_colors": 4,
"min_share_pct": 1,
"include_contrast": true
}Ergebnis & Dokumentation
Maschinenlesbare Dokumentation dieses Hubs
Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.
Weitere Endpunkte dieses Hubs
- Medienwerk0,03 USDC · variabel
ad detect
POSThttps://medien.halowerk.com/v1/ad-detectTakes a podcast episode of up to 120 minutes and returns its advertising segments: paid sponsor reads, self-promotion (newsletter, Patreon, merchandise) and cross-promotion of other shows, each with start and end on sentence boundaries, the
- Medienwerk0,004 USDC · variabel
audio concat
POSThttps://medien.halowerk.com/v1/audio-concatTakes 2 to 10 audio or video files (each up to 24 MB, together up to 60 minutes) and joins their audio in the given order. Between parts either a pause of chosen length or a crossfade is placed; optionally every part is brought to a common
- Medienwerk0,002 USDC · variabel
audio convert
POSThttps://medien.halowerk.com/v1/audio-convertTakes an audio or video file and returns the audio in the requested format — MP3, Opus, Ogg Vorbis, AAC in M4A, WAV or FLAC — with selectable bitrate for lossy formats, sample rate and mono or stereo. Only the first audio stream is converte