The expression "if labels = 0" is always "false"; you compare a label component with a value. Perhaps it would be better to compare "if labels = label1" or sth. like that. I guess all labels in your app get black color. (you should compare a component with another component - not potatoes with tomatoes. Non è facile da capire los bloccos e i loro significati in italiano )