Change box color in real time