I want to scale the opacity of something with the height of the object. The opacity is between 0 and 127. I set the opacity to 117. If the object has a height of 6, the darkest part of the object is rgb(152, 152, 152). If the object has a height of 26, the darkest part of the object is rgb(82, 82, 82). I want it to scale so that the target rgb will be 82, 82, 82. If I set the opacity to 106, with a height of 6, the object is rgb(79, 79, 79), which is close. If I set the opacity to 107, with a height of 6, the object is rgb(85, 85, 85).