Optimize Images up to 80% with AVIF and WEBPSee how it works

How to identify prominent colors on an image?

Return a list of up to 16 of the most prominent colors in an image, making it easy to group similarly colored images together and perform actions according to the color palette.

Alt text

Try it for yourself:


https://ucarecdn.com/
3f8041f1-bd2b-4b33-b60b-1b6e297b1b66/
-/preview/
-/main_colors/5/

The number 5 in this example specifies the number of colors to return. Try changing it to see how it affects the result.

You’ll receive a JSON file with a main_colors section:


{
  …
  "main_colors": [
  [6, 42, 88],
  [101, 80, 96],
  [244, 110, 128],
  [234, 206, 206],
  [91, 162, 206]
  ]
  }
Read more about color detection→