Colorize output

Credit for the original code: @kunigaku
Credit for re-commiting with smaller commits: me