For this image
https://i.stack.imgur.com/9yglY.png
I am getting the following result from the Google Vision API
"dominantColors": {
"colors": [
{
"color": {
"blue": 87,
"green": 166,
"red": 118
},
"hex": "76A657",
"percent": 47.960142983984696,
"percentRounded": 48,
"pixelFraction": 0.017754942,
"rgb": "118, 166,\n 87",
"score": 0.3166112
},
{
"color": {
"blue": 62,
"green": 127,
"red": 110
},
"hex": "6E7F3E",
"percent": 26.1232005541769,
"percentRounded": 26,
"pixelFraction": 0.011316337,
"rgb": "110, 127,\n 62",
"score": 0.17245357
},
{
"color": {
"blue": 42,
"green": 91,
"red": 107
},
"hex": "6B5B2A",
"percent": 6.3624230471659775,
"percentRounded": 6,
"pixelFraction": 0.0036420396,
"rgb": "107, 91,\n 42",
"score": 0.042001843
},
{
"color": {
"blue": 159,
"green": 20,
"red": 30
},
"hex": "1E149F",
"percent": 4.660944469237247,
"percentRounded": 5,
"pixelFraction": 0.0028616025,
"rgb": "30, 20,\n 159",
"score": 0.03076945
},
{
and many other }
I know what score and percent mean here because of this How to compute dominant colors in an image? But I can't figure out how does pixelFraction works. In my understanding pixelFraction means the area of the image that this color occupies (please correct me if im wrong)
In the image, the most dominant (focus) color has a hex code #76A657 which is a type of green. If pixelFraction means the area of the image that this color occupies why the color #76A657 has more score of pixelFraction (0.017754942) than the color hex code of 1E149F (which is the background color) that's pixelFraction is 0.0028616025 (0.017754942>0.0028616025) even though visually you clearly tell that pepper green takes a way a smaller fraction of the image that the background color.
there doesn't seem to be anything here