I am interested in calculating the "optical alignment" of the icon . For instance:

If you are familiar with UI design, you know certain icons, such as the triangle of the play button, as shown above, often feel out of place. Although the rectangular borders of the icon are technically centered, the icon is still not centered. This is due to the uneven distribution of the surface area of the icon.
What I tried:
, , , Google " Google" , Google, , Mathematics Stack Exchange 2 , .
Math SE , JPEG, , , . , , HTML5 ( - JavaScript, "" ) , , .
, - , ( , , , ). , , , , ..
:
- , ? , , , .
: , , , , .
user5536767