console write line color

			Console.BackgroundColor = ConsoleColor.Green;
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Console.Clear();
            //green on green
            Console.WriteLine("yo");
            Console.ReadLine();
        

4
7
Anthony 125 points

                                    //StackOverflow Mark Byers
class Program
{
    static void Main()
    {
        Console.BackgroundColor = ConsoleColor.Blue;
        Console.ForegroundColor = ConsoleColor.White;
        Console.WriteLine("White on blue.");
        Console.WriteLine("Another line.");
        Console.ResetColor();
    }
}

//Threadsafe version 
//StackOverflow Darin Dimitrov
public class ConsoleWriter
{
    private static object _MessageLock= new object();

    public void WriteMessage(string message)
    {
        lock (_MessageLock)
        {
            Console.BackgroundColor = ConsoleColor.Red;
            Console.WriteLine(message);
            Console.ResetColor();
        }
    }
}

4 (7 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
How to change color c# console console writeline with color how to color text in console app c# c# change console background colorful.console set custom color in console c# set console text color c# how i can put a color in the console in c# c# change color of whole console console write color console.writeLine colours console.writeline in colours c# write colored text to console how to change console color in c# .net c# change console text color for one string how to change console background color in c# change font color in c# console c# change background color console c# change console text colour how to change console color in c# in numbers how to change the color of the console write line c# how to change to color of console c# how to put color in console writeline how to change a color of the console line c# change the background color of console in C# how to change text color in console c# change color of text in console using c# change the console colour from black C# change the background and text colour of the console C# console.writeline color c# create consolecolor from rgb change console color in c# change color console rgb c# Console.WriteLine colorful c# change color of text in console changing the console background colour in C# change text color in c# console change c# console color how to change color of text in console app in c# c# console change color how to change console text color in c# c# custom console color set colour of part of text c# console set colour of text c# console set color console c# text set color console c# c# use colors console writeline c# terminal color change the color of the console how to change the text color c# console ap changing console color c# c# colors console app C# console application text color how to change the colour of console text in C# color text c# change console colour cs console app change text color c# color cmd line colored colosole text c# how change console background color in c sharp how to write to console in different color console color set writeline color C# color background how to change label colour on c# fourm change console color inline c# stet console color c# C# change color console how to change console color in c# C# console.write with color color in console.writeline how to make colored text in c# apply color to a char c# .net what is default console color .net console color as char c# color console.writeline change console color c# c# white console set console colors c# set console color c# c# change terminal coloir change color of console in c# console color part of string c# c# console color text set color of characters in one go c# console c# change console color console configure color c# change color console c# C# hnage console color console writeline color for string console.writeline c# with color console.color c# change color console application c# c# console app set text colour c# coloring text c# console.white c# consolecolor how to check if a colors is dark write colors in variable c# console console application get background color change colour of line c# console how to change the background colour of the whole cmd c# change text color writeline c# how to make console.writeline write in a different colour how to make new background color in console application c# C# Display different coloured text text colour in c# change colour of text in c# chaning color in console how to change console background c# console.writeline color how to color text in c# console change background c# rainbow text in cli c# c# different color text how to make console color c# csharp text to green console.writeline with colors gow todo ground color in c# c# coloured console text console.foregroundcolor print color to terminal c# c# color console write color line c# console how to add a colour using C Sharp c# console change text color make text from console write red C# cmd color how to console.writeline with colors c# c# color of the console CONSOLE APP CHANGE COLOR c# color text in console c# console app change text color c# text color change color console.writeline c# console.writeline c# color c# console application console.font color c# console application console.writeline color how to change console text colout vs 2019 how to use colors on c sharp c# changing color of text c# colored console c# application color text colored text in c# Set text color in console app C write colors to console how to print text in color in c# change color of console c# Chaning TExt color in CSharp Console change color on text c# console writeline c# change color writeline in a color c# how to choose color for every text in console vb.net text color in c# c# built in font color console c# command color c# console text color how to make terminal text colorful C# c# console change background color make text green in c# c# change console background color console colours c# visual studio console colour C# how to cahnge text color how 2 change font and color in c# console colored output c# console C# set console color colored text c# c# console color list c# color console output text c# change text color c# change console text color c# console writeline color c# console foreground color c# how to color text change text colour in c# console writeline color c# console write line color c# change color of the console text c# C# coloured Console.WriteLine give color to console oputput c# c# console output color console colors c# c# console app color text change color of text c# console color c# c# console colors c# color terminal text c# console.write color c# colorful console rainbow c# console.writeline color text how to color letters in C# c# set console colors c# set console colour c# how to highlight console text c# text color change console.writeline in c# color c# print color text message to user c# console.writeline text color c# console write text color c# console print color c# console colours c# console color change color of konsoole c# command prompt colours color console c# color in console c# console write line color c# console font color change error loop c# color console output c# console writeline change text c# BgColor c# background color not a console app how to change the text color in c# C# console string color set color for console output c# set console line color c# how to change colour of console writing c# change text color in console c# c# colored text colour text C# font colour console C# c# console change color text console text color c# change console text color c# C# how to change color of console c# write colors to console c# change colour of console
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source