Texture adjustment at runtime for thermal image

This sounds like a job for the inverse lerp.

You specify two values (ie the min and max temperature value) and the input image (your full spectrum heat-map). It will map those values into a 0-1 range which you can map to your gradient texture. To change the gradient’s focus you shift the A and B of your inverse lerp up and down. You’ll probably want to saturate the inverse lerp output as it does not clamp to the 0-1 range. This will cause everything outside of the range to clamp to 0-1 and everything within the specified temperature range to fall proportionately along the gradient UV.