updating color variable