Ragazzi, vorrei che un elemento cambia colore a seconda dei dati. Faccio un esempio: la casella BPM è verde fino a 99 battiti, quando arriva a 100 battiti deve cambiare colore in rosso. Non riesco a capire come si fà. Grazie a chi mi dà una mano.
You asked.
Guys, I would like an element to change color depending on the data. For example: the BPM box is green up to 99 beats, when it reaches 100 beats it should change color to red. I can’t figure out how to do it. Thanks to anyone who can help me.
You would have two layers with images or text one red one green .
The opacity of each would have a formula .
Green
$#ZHR#<100?100:0$
Red
$#ZHR#>=100?100:0$
Get back to us if you struggle .
There are some template faces you can inspect for common expressions such as colour changing progress. they can be found in this topic
Feel free to correct errors or suggest additional things to include for reference.
Maybe this tutorial is of help:
Grazie rob. Mi sei stato di grande aiuto, infatti ho ampiamente risolto.
Grazie Crescione. Ho applicato questa formula ed ha funzionato alla grande. La ho applicata anche per altri oggetti (cambiando ovviamente alcune cose per esigenza) e và benissimo. Ora però, con un altro progetto, ho la stessa esigenza ma inserendo un altro colore: il giallo. Dal 100% al 21% è verde e funziona bene, dal 10% a 0% è rosso e funziona altrettanto bene, ma vorrei inserire il giallo fra i due, cioè dal 20% al 11%. Stò usando la stessa formula con ovvi cambiamenti ma non riesco a farla funzionare. Teniamo presente che si tratta di files PNG di 3 colori.
Sì, è più difficile con numeri tra MAX e MIN. Quindi dobbiamo usare un condizionale composto che dice se bat è maggiore di 20 E bat è minore di 30, allora esegui l’azione. È più facile e migliore per la comunità se fai tu la traduzione. Per favore.
Yes it is more difficult with numbers between MAX and MIN Then we have to use a compound conditional that says if bat is Greater than 20 AND bat is Smaller than 30 then do action . It is easier and better for the community if you do the translating . Please .
.
$#ZHR#>=11&&#ZHR#<=20?100:0$
.
See there I used Heart rate for the variable you can use the one you want . I think you have an understanding .