I have a number between 0 and 1, and I would like to convert it into the corresponding RGB components in a blue scale. So, when the number is 0, I would like to obtain [255,255,255] (i.e. white), while if the number is 1 I would like to obtain [0,0,255] (blue).
Do you know a formula or how this can be implemented with Python? It would be nice to know also how to convert the 0-1 number to other color scales, for example green (in the sense that 0 corresponds again to [255,255,255], while 1 corresponds to [0,255,0]).
Thanks in advance for any help you can provide!