By clicking on the checkboxes the color changes as expected. But every time I leave the app or switch screens and come back, the color stays the original color. That is, the color of when I clicked does not remain.
I can’t understand what are you trying to code as it is in a different language but I think you have 2 colours and you want them to change with the click of a checkbox and you also want to store the value of colour so that it remains same. To do this you can use a tiny DB component…
when screen init…
If TinyDB get value = color1
then set colour to your colour
else another colour…