I have this line
<th style="text-align: center; color: cycleTimeColorStat([S5MachLive,70])" {{ S5MachLive }} </th>
Where {{ S5MachLive }} is my shown value cycleTimeColorStat is this function
cycleTimeColorStat(time, num) {
try {
if (time !== 0) {
return "yellow";
} else {
if (time < num) return "green";
else {
return "red";
}
}
} catch (error) {
return "yellow";
}
},
What I'm trying to do is call the function to evaluate for color and then return the color and render the value in that color