Hi is there any ways to color the color of a text according to the different range of values??
Eg:
if Marks[1] \<= 50 then Results = "Pass" elseif Marks[1] \<= 60 and Marks[1] \> 50 then Results = "Good Job"
and when printing out
local score = display.newText( Results[1], 0, 0, "Helvetica", 32 ) --score:setFillColor( 0 ) -- black score.x = display.contentWidth - 165 score.y = 200
What i want is that when I open the app it gives me a random mark and would print out the results.
How should I do it so that it is not hard coded? Like when the system gives me a value of 60 it would display “Good Job” in Blue color while “Pass” is in red color.
Thanks