Index: src/Common/SemanticError.cc
===================================================================
--- src/Common/SemanticError.cc	(revision e5d5272eaf163f7cdda41557fe573b774e03451a)
+++ src/Common/SemanticError.cc	(revision dda3e2a961e410d4b562f20c6756d7e961513249)
@@ -149,21 +149,27 @@
 // Helpers
 namespace ErrorHelpers {
+	Colors colors = Colors::Auto;
+
+	static inline bool with_colors() {
+		return colors == Colors::Auto ? isatty( STDERR_FILENO ) : bool(colors);
+	}
+
 	const std::string & error_str() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[31merror:\e[39m " : "error: ";
+		static std::string str = with_colors() ? "\e[31merror:\e[39m " : "error: ";
 		return str;
 	}
 
 	const std::string & warning_str() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[95mwarning:\e[39m " : "warning: ";
+		static std::string str = with_colors() ? "\e[95mwarning:\e[39m " : "warning: ";
 		return str;
 	}
 
 	const std::string & bold_ttycode() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[1m" : "";
+		static std::string str = with_colors() ? "\e[1m" : "";
 		return str;
 	}
 
 	const std::string & reset_font_ttycode() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[0m" : "";
+		static std::string str = with_colors() ? "\e[0m" : "";
 		return str;
 	}
