add comments for getTransparentPercent.