I have the following heatmap
and all I know is that the mapping between the colors and the original values is as follows: -100 is blue, 0 is black, and +10 is red. The mapping is assumed to be linear. White squares can be ignored (i.e nan).
I have managed to extract the heatmap as an SVG (the one I’m showing here is a WEBP because stackoverflow does not allow SVG) and I therefore have the RGB color of each square.
How could I map each RBG color back to its original value, or at least a good approximation ?
6