Obtaining Average RGB Value of an Image
You can use this function only by making the API call.
This operation enables you to obtain the average RGB value of an image, which is returned as a hexadecimal value in JSON format.
Operation name: average-hue
Example
You can access the following address through a web browser and obtain the average RGB value of the example.jpg image:
https://e-share.obs.cn-north-1.myhuaweicloud.com/example.jpg?x-image-process=image/average-hue
If information similar to the following is displayed, the average RGB value of the image is obtained successfully:
{"RGB":"#28577D"}
The original image of example.jpg is as follows:

The obtained average RGB value (#28577D) is:

Last Article: Obtaining Image Information
Next Article: Setting Image Effects
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.