Skip to content

/color endpoint

Use the /color endpoint to search your collection based on colors. Specify one or more colors to retrieve images that match those colors, or have Flow extract the color palette from an input image to search with.

The examples below require the example dataset.

Find images with similar Hex color

Search by a blue color in format 0xRRGGBB.

Open Flow in browser

Search by multiple colors by adding comma separated 0xRRGGBB values.

Open Flow in browser

Search by color palette

Use the extracted color palette of an image and search for images with a similar palette.

Open Flow in browser

Filter by color name

The /color endpoint requires* input. In the following examples, only filtering is used and therefore the generic endpoint /select is used.

All images are automatically categorized by their color names. To show images containing violet color, just add a filter query fq.

Open Flow in browser

Adaptive user interfaces

Flow automatically extracts the dominant color palette of each image and stores their hex values in the field color_palette_hex. These colors can be used create adaptive user interfaces.

Brand colors

Extracted brand colors using company logos.

Often user interfaces can be customized to fit the company's brand. Automatically set brand colors based on the extracted colors of an uploaded logo. Flow automatically detects and ignores backgrounds.

As you can see in the image above, Flow provides up to five colors and dynamically adjusts the number of colors to the image content.

Extract color palette from external images.

You don't have to index an image in order to retrieve its color palette. Instead, you just analyze the image using the /analyze endpoint and extract the color_palette_hex field from the output object of the response.

Ambient coloring

Example of dynamic ambient coloring when hovering over an image

Image-dependent ambient coloring creates a dynamic user interface to emphasize the impression of the images. Use the main color of an image to automatically color its surroundings in a user interface like in an image gallery, detail page of a product etc. This approach is particularly suited for music covers, artworks, and products.

To do so, request the color palette of the selected image with fl=color_palette_hex. The colors are sorted by frequency in descending order. Retrieve the first value of color_palette_hex to get the most important hex color of the image and use it for ambient coloring.