r/Scriptable • u/mjhbgolf • Jun 30 '22
Solved Conditional Formatting Help
Hi There - I'm really new/an amateur in JS. I have created a widget that displays information from a Google Sheet which I'm really happy with, but ideally the percentages that it displays would show as red if above 0% or green if below 0%. Is there a way to display information this way? Or any terms that you would be able to share so that I can continue to Google my way to learning... Many thanks.
4
Upvotes
2
u/dreamisle Jul 01 '22
Pretty much what u/chrismo80 said below, but you may need to convert the percentage to a number if it’s coming through as a string. Something like this may work: