This topic describes the parameters and examples to query the average tone of an image.


Operation name: average-hue

The returned average tone information is in the following format: 0xRRGGBB. RR, GG, and BB use two hexadecimal digits. RR indicates red. GG indicates green. BB indicates blue.


You can process images by using object URLs, OSS SDKs, or API operations. In this example, object URLs are used. For more information about how to use OSS SDKs and API operations to process images, see IMG implementation modes.

The oss-console-img-demo-cn-hangzhou bucket that is located in the China (Hangzhou) region is used as an example. Public endpoint of the image:

The URL used to query the average tone of the image is in the following format:

The average color information returned in the browser is 0xbbcd7f. 0xbbcd7f indicates the RGB color value (187,205,127).