Hi,
You should cut down the problem in smaller chunck and put it back up when you have each part working on its own.
Make a system can return a color within a defined range, let's say the range is 0 to 10, and a hsv color between say 40 and 80 in Hue ( using HSV actions on the ecosystem is key here, you got that right?)
this means that you need to remap a value ranging from 0 to 10 to a value ranging from ( using the custom action floatremap on the ecosystem)
so 0 ->40 and 10 -> 80
Now, as you change the value ranging from 0 to 10, you should have your hue moving from 40 to 80, and thus you get a color associated with that 0-10 range.
That would be your first step. Once you have that working, you can then use that logic within your game, and you will likely adjust the ranges, but that's already tweaking.
Let me know how you progress on this.
Bye,
Jean