I've got the following span:
<span><b class="colored">' + this.my.points_gp + '</b></span>
The this.my.points_gp
can be a value between -12 and 80.
Now I need to define the "colored" class. What I need is to color the this.my.points_gp
taking into account its value.
- If it's -12 must be very red.
- If it's 0 must be orange.
- If it's 20 must be light green.
- If it's 80 must be super green.
The thing is that values between the ranges should have different color code. I mean, 70 must be greener than 40 that must be green but lighter. -6 must be an intermediate between red and orange cause it's in the middle of the very red (-12) and the orange (0) and so on...
I'll try to explain myself better: I need 92 different colors and assign them gradually taking into account the base colors that I gave. Sorry for my english it is not my home language.
I don't know if this is possible... maybe in javascript and not in plain css?