Hello Alex,
The problem was that you had three < if > that were saying:
if(n0.val<600)
{
n0.pco=0
}
if(n0.val<1100)
{
n0.pco=64512
}
if(n0.val<1600)
{
n0.pco=645
}
So, now the t0.txt , in the beginning is 510. Now the first < if > will change the color of the text to black, because 510 < 600.
Now comes the second < if >, that changes the color of the text to orange, because 510 < 1100.
The third if now also changes the color of the text to dark green, because 510 < 1600.
This way ONLY the final < if > that is executed, will change the color you see of the text, in this case, dark green.
What you should write is:
if(n0.val<600)
{
t0.pco=0
}
if(n0.val>600&&n0.val<1100)
{
t0.pco=64512
}
if(n0.val>1100&&n0.val<1600)
{
t0.pco=645
}
if(n0.val>1600)
{
t0.pco=512
}
Now the color of the t0 (I guessed this was the component of which you wanted to change the color of the text, as n0 is not visible) will change to black if the value of n0 is less that 600 < n0.val<600 >,
change to orange if it is greater than 600 AND less than 1100 < n0.val>600&&n0.val<1100 >
change to dark green if it is greater than 1100 AND less than 1600 < n0.val>1100&&n0.val<1600 >
and finally change to darker green if it is greater than 1600 < n0.val>1600 >
I have tested it and it is working.
For further questions, do not hesitate to ask.