/v1/palette
Extract color palette from an image
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
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_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"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
}