Safer color terminal handling