update function color