While I was testing Haldric, I noticed that the colors of the health bar in the side panel... didn't look too good. This is caused by the fact that a simple RGB calculation usually doesn't produce decent results.
This PR replaces the RGB calculations in _get_red_to_green_color() with a relative ratio, which in turn is used to pick a color for the health bar (or anything else that might need it, like terrain defense labels). The five colors used here are green, lime, yellow, orange and red. The attached picture shows the final result.
While I was testing Haldric, I noticed that the colors of the health bar in the side panel... didn't look too good. This is caused by the fact that a simple RGB calculation usually doesn't produce decent results. This PR replaces the RGB calculations in
_get_red_to_green_color()
with a relative ratio, which in turn is used to pick a color for the health bar (or anything else that might need it, like terrain defense labels). The five colors used here are green, lime, yellow, orange and red. The attached picture shows the final result.