Variable colours for temperature

Can anyone please provide the formula to change the current temperature colour at 20° & above, 15°-19°, 10°-14° & below 10°. (Celsius). I tried myself, but kept getting an error message.
Thanks.

Well this isn’t exactly what you want but it’s the formula I use for my weather, and it’ll be ready to adapt for what you want.

$if(wi(tempc)>35,gv(colours/gold),
wi(tempc)>30,gv(colours/blk),
wi(temp)>10,gv(colours/gold),
wi(wchill)<-15,gv(colours/blue),
wi(wchill)<-8,gv(colours/blk),
gv(colours/wht))$

The numbers are Celsius, the different colours are Global’s that are in a global folder called ‘colours’, and then I use wind chill factors instead of exact temperature when it gets colder.

Thanks very much.
Where can I find this folder - if I add a global & tap it I see a list, one of which is “Color”.
Thanks.

PS. I don’t want the C to show, as I already know it’s Celsius.

You don’t need to put the colors in a global folder, it’s just what I do. If you want to create a folder for a group of global variables you just create a global, as you would any other, and choose Folder as the type. Then you can create your other Globals inside it.

Secondly, if you don’t want the °C then just use wi(temp) instead of wi(tempc).

Thanks for your patience. Whilst I have used KWGT for a number of years, I have not done anything this complicated (for me) before. I assumed I don’t need a folder. I had a go, using 4 steps instead of your 5, but had zero success. Do I apply the global in Paint or after the preset current temparature? Whilst I don’t want the C, I would like, if possible the °.
Thanks.
Thanks.

The formula I showed would go in the Paint field (after you change it to Formula by checking the little box at right and then selecting the calculator icon at top).

Then whatever you put in the Text field will be displayed in the appropriate colours as shown in this formula. So I would put:

$wi(temp)+“°”$

in the Text field.

And you’re correct that no globals need to go in a folder, I just do it to try and keep my list of Global’s tidier especially ones I use over and over.

Finally got round to giving this a try & it works or, more accurately, I got it to work. How you guys know all this stuff is beyond me.
Thanks.

For me it’s a lot of reading and trial and error that is sort of a hobby. I try to figure things out like some people do Sudoku or crossword puzzles.