Optimize output of multiple colored lines