System.TermInfoDriver.ChangeColor C# (CSharp) Method

ChangeColor() private method

private ChangeColor ( string format, ConsoleColor color ) : void
format string
color ConsoleColor
return void
		void ChangeColor (string format, ConsoleColor color)
		{
			int ccValue = (int)color;
			if ((ccValue & ~0xF) != 0)
				throw new ArgumentException("Invalid Console Color");

			int ansiCode = _consoleColorToAnsiCode[ccValue] % maxColors;

			WriteConsole (ParameterizedStrings.Evaluate (format, ansiCode));
		}