RadarPricesOrder

Home › APIs › Images, audio & video

Images, audio & video

Color Palette from Image API

In plain words

Pick the main colours out of a picture, with their colour codes.

Used by: Content teams, shop owners, developers of apps that handle media.

Extract the 5, 8 or 12 dominant colours of an image with HEX, RGB and share. For brand, design and UI tools. Runs on our server, files are deleted right after the call, nothing stored.

Try it live, no sign-up

Run the example as is, or change the input. 5 own tries a day without a key.

Example request

curl -X POST https://radarbg.com/v1/color-palette-from-image \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"fileName": "sample.png", "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC", "colors": "5"}'

Answer: {"ok": true, "count": N, "items": [...], "usage": {...}}. Failed calls are not counted.

Inputs

FieldTypeDescription
fileContentstringThe file as base64 (a data: URI is fine)
fileNamestringFile name with extension, e.g. report.pdf
filesarrayOr several files: [{fileName, fileContent (base64)}]
colorsstringHow many colours

Price

Included in every plan: 500 calls a month free, then from €9 a month for 5,000 calls across all APIs. Pro, €29 for 25,000 calls, is the one we recommend.

Questions

What does the Color Palette from Image API do?

Pick the main colours out of a picture, with their colour codes.

Where does the data come from?

Extract the 5, 8 or 12 dominant colours of an image with HEX, RGB and share. For brand, design and UI tools. Runs on our server, files are deleted right after the call, nothing stored.

How much does it cost?

500 calls a month are free with no card. Paid plans start at EUR 9 a month for 5,000 calls and include every API on Radar. Failed calls are not counted.

Can I use it without writing code?

Yes. Try it live on this page, use our free browser tools, or ask us to run it on your list as a service.

Related APIs

Audio TranscriptionUpload a link to an audio file or podcast and get the spoken words as text.
Bulk Image DownloaderGive a list of pages or image links and get all the pictures in one ZIP file.
Image Blur APIBlur a part of a photo (a face, a number plate, a name) or the whole picture.
Image Compression APIMake photos smaller in file size so they upload and load faster.
Image Converter APIChange pictures from one format to another, for example iPhone HEIC or WebP to JPG.
Image Crop APICut a picture to the size you need, like square for Instagram or 16:9 for video.