Improve TERM color handling