It seems FTA that the ‘average’ color is found by resizing the color information within the bounds in question to 1:1 and then using that color to fill the bounds. I’m not sure but that seems to be an important algorithmic element of this process that is almost completely delegated to a side effect of an image library and not really discussed in the context of this write up.