---
title: Detect Image Color from URL API
slug: image-color-detection-api
url: https://apyhub.com/skycraft/service/image-color-detection-api
provider: Skycraft
auth: api_key
version: v1
service_type: sync
endpoints: 1
atoms: 20
mcp: true
---

# Detect Image Color from URL API

Detect the main color of any image from its URL. Returns hex codes plus main and specific color names as JSON, for tagging, filtering, and color matching.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| GET | `https://api.eu.apyhub.com/skycraft/image-color-detection-api/detect-color` | What it does Detects the main color in an image identified by the url query parameter and returns t… | 20 |

## Endpoint reference

### Detect Main Image Color API

`GET https://api.eu.apyhub.com/skycraft/image-color-detection-api/detect-color` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | query | string | yes | Example: `https://fastly.picsum.photos/id/63/5000/2813.jpg?hmac=HvaeSK6WT-G9bYF_CyB2m1ARQ…`. |

#### Quickstart

Detect the main color of an image by passing its `url` query parameter.

```bash
curl -X GET "https://api.eu.apyhub.com/skycraft/image-color-detection-api/detect-color?url=https://assets.apyhub.com/samples/sample.png&width=200&height=200&crop=true" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON array of objects. Each object may include `hex_code`, `main_color`, and `specific_color`, all of which can be `null`.

```json
[
  {
    "hex_code": "#73685b",
    "specific_color": "Dim Gray",
    "main_color": "Gray"
  },
  {
    "hex_code": "#e5eeed",
    "specific_color": "Catskill White",
    "main_color": "White"
  },
  {
    "hex_code": "#b78f1f",
    "specific_color": "Dark Golden Rod",
    "main_color": "Yellow"
  },
  {
    "hex_code": "#3f3326",
    "specific_color": "Woody Brown",
    "main_color": "Brown"
  }
]
```

## About

## What it does
Detect Image Color lets you find the dominant color of any image from its URL. Send a `GET` request to `/detect-color` with the image `url`, and get back structured color data you can use right away, without running your own image analysis.

The `url` parameter is required and can be up to 1000 characters long. The response is a JSON array of objects. Each object can include `hex_code`, `main_color`, and `specific_color`, which are all strings. Any of them may be `null` when a value can't be determined, so handle empty fields in your code.

Use `hex_code` when you need an exact value for styling, such as a card background or accent color. Use `main_color` for broad categories like red or blue, and `specific_color` when you want a more precise color name for labels or search filters.

Use Detect Image Color when you need to tag or sort images by color, build color filters for a product or media catalog, match UI accents to uploaded pictures, or add color metadata to images in a content pipeline.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/skycraft/service/image-color-detection-api
