updating color logic