Through this post I've learned how to make a function to map a colour gradient to an interval of numbers like
redblue =
Blend[Transpose[{{0.5, 4.1`}, {RGBColor[0.986145, 0, 0.0272526],
RGBColor[0, 0.0310826, 0.516304]}}], #1] &
I tried by reversing the Transpose to create a function to do the very opposite...put in an RGBColor
between the original limits and get a number. However it failed miserably.
num = Transpose[{{0.5, 4.1`}, {RGBColor[0.986145, 0, 0.0272526],
RGBColor[0, 0.0310826, 0.516304]}}] &
How would one create a function to map RGBColor
to a number?