I need to map a range of positive integers (e.g. 1 - 15'000) to a colour space such that the minimum value is green and the maximum value is red. I.e. I need an algorithm where I can give an integer (and maybe the min, max values) as an input and receive an RGB value as the output.
I am aware of the possibility to discretise the colour space but i'd prefer a solution where I do not have to.