Detect the main color of an image. The API returns a list of colors and their hex codes. The API supports images in the following formats: JPEG, PNG, and GIF.
The detected colors are given in hex code and their specific and main color (color family) names.
[
{
"hex_code": "#b01c20",
"specific_color": "Firebrick",
"main_color": "Red"
},
{
"hex_code": "#bfaf9a",
"specific_color": "Thistle Green",
"main_color": "Green"
},
{
"hex_code": "#36180d",
"specific_color": "Brown Pod",
"main_color": "Brown"
}
] {{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
The API supports common image formats including JPEG, PNG, and GIF.
The API returns both the specific hex code of the detected color and the general "main color" family (e.g., Red, Blue, Green) it belongs to.
Yes, by using the "main color" returned by the API, you can easily categorize and sort images based on their dominant color family.
The Detect Main Image Color API analyzes an uploaded or linked image to find its dominant color, whereas the Search Images API allows you to find images based on keywords or color filters.