Skip to content
GET /v1/palette

Extract color palette from an image

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/palette-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/palette-api/v1/palette" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/palette-api/v1/palette", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/palette-api/v1/palette");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/palette-api/v1/palette",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "count": 4,
        "width": 8,
        "height": 8,
        "average": {
            "hex": "#808040",
            "rgb": {
                "b": 64,
                "g": 128,
                "r": 128
            }
        },
        "palette": [
            {
                "hex": "#ff0000",
                "rgb": {
                    "b": 0,
                    "g": 0,
                    "r": 255
                },
                "percentage": 25
            },
            {
                "hex": "#00ff00",
                "rgb": {
                    "b": 0,
                    "g": 255,
                    "r": 0
                },
                "percentage": 25
            },
            {
                "hex": "#0000ff",
                "rgb": {
                    "b": 255,
                    "g": 0,
                    "r": 0
                },
                "percentage": 25
            },
            {
                "hex": "#ffff00",
                "rgb": {
                    "b": 0,
                    "g": 255,
                    "r": 255
                },
                "percentage": 25
            }
        ],
        "dominant": {
            "hex": "#ff0000",
            "rgb": {
                "b": 0,
                "g": 0,
                "r": 255
            },
            "percentage": 25
        },
        "pixels_sampled": 64
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:03.271Z",
        "request_id": "cc88a429-3718-4982-ba6e-aefc292478d9"
    },
    "status": "ok",
    "message": "Extract color palette from image",
    "success": true
}