Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

rgb to console color

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;
Comment

PREVIOUS NEXT
Code Example
Csharp :: httpclient getstringasync 
Csharp :: Count the Number of Duplicate Characters 
Csharp :: lwjgl fullscreen 
Csharp :: array in c# 
Csharp :: asp net core dependency injection factory with parameters 
Csharp :: textbox gotfocus wpf 
Csharp :: concatenate two lists in c# 
Csharp :: double quotes in a string c# 
Csharp :: check if list contains any empty element in c# 
Csharp :: vb.net drag window without titlebar 
Csharp :: list with search bar uwp c# 
Csharp :: c# bool list count true 
Csharp :: unity get velocity at point 
Csharp :: long string c# 
Csharp :: provide inject vue 
Csharp :: C# Console font 
Csharp :: datetimeoffset to datetime 
Csharp :: dbset 
Csharp :: remove control characters from string c# 
Csharp :: 2d explosion unity 
Csharp :: what are delegates and how to use them c# 
Csharp :: send email every 5 minutes c# 
Csharp :: unity image button 
Csharp :: create anchor tag dynamically c# 
Csharp :: command parameter wpf 
Csharp :: call class c# 
Csharp :: how many zeros in quinnonagintillion 
Csharp :: c# datagridview select row index programmatically 
Csharp :: Handlebars c# datetime now 
Csharp :: mailkit send email c# 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =