added terminal color detection