Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

system.drawing.color to system.consolecolor

int index = (c.R > 128 | c.G > 128 | c.B > 128) ? 8 : 0;
                index |= (c.R > 64) ? 4 : 0; 
                index |= (c.G > 64) ? 2 : 0; 
                index |= (c.B > 64) ? 1 : 0; 
                Console.ForegroundColor = (System.ConsoleColor)index;
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
6+3 =