Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# console background color

Console.BackgroundColor = ConsoleColor.Green;
Comment

c# console foreground color

Console.ForegroundColor = ConsoleColor.DarkGreen;
Comment

c# console foreground color

//Background color
Console.BackgroundColor = ConsoleColor.Green;
//Foreground color
Console.ForegroundColor = ConsoleColor.Black;
//Reset
Console.ResetColor();
Comment

c# color to console color

 public static ConsoleColor FromColor(Color c)
        {
            int index = (c.R > 128 | c.G > 128 | c.B > 128) ? 8 : 0; // Bright bit
            index |= (c.R > 64) ? 4 : 0; // Red bit
            index |= (c.G > 64) ? 2 : 0; // Green bit
            index |= (c.B > 64) ? 1 : 0; // Blue bit

            return (System.ConsoleColor)index;
        }
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity custom update 
Csharp :: how to change loaded scene in unity 
Csharp :: how to make a enum list in c# 
Csharp :: unity set material 
Csharp :: how to use file watcher in c# 
Csharp :: new color unity 
Csharp :: how to spawn a object in unity 
Csharp :: create char array c# 
Csharp :: how to add item to listbox in c# 
Csharp :: C# How to write Hello World 
Csharp :: loop datagridview c# 
Csharp :: c sharp stream to byte array 
Csharp :: unity chat system 
Csharp :: how to get the date of the first day and last day of the week c# 
Csharp :: c# number in range 
Csharp :: c# write variable in string 
Csharp :: c# list grouping 
Csharp :: print content of array c# 
Csharp :: mute sound unity 
Csharp :: smtp check if email sent 
Csharp :: c# type from string 
Csharp :: c# get command line arguments 
Csharp :: Celsius to Fahrenheit c# 
Csharp :: c# byte array to file 
Csharp :: c# read xml file 
Csharp :: c# winforms textbox select text 
Csharp :: byte to binary c# 
Csharp :: c# convert stream to memorystream 
Csharp :: unity actions 
Csharp :: how to start a webpage from a button c# 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =