Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6609209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:41:29+00:00 2026-05-25T19:41:29+00:00

In C#, the console has properties that can be used to change the background

  • 0

In C#, the console has properties that can be used to change the background color of the console, and the foreground (text) color of the console.

Console.BackgroundColor // the background color
Console.ForegroundColor // the foreground/text color

The issue is that background color applies only where text is written, not to free space.

Console.BackgroundColor = ConsoleColor.White; // background color is white
Console.ForegroundColor = ConsoleColor.Blue;  // text color is blue

Now, with the above code, it does indeed turn the text blue, but it only turns the background of the text white, instead of the entire console window’s background.

Here’s an example of what I mean:
The background only covers the background of the text, not of the entire console window

As you can see, the white background only displays behind the text, and does not change the color of the entire console window.

How do I change the color of the entire console window?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:41:29+00:00Added an answer on May 25, 2026 at 7:41 pm

    You need to clear the console window AFTER setting the colors but BEFORE you write the text…

    Console.ForegroundColor = ConsoleColor.Red;
    Console.BackgroundColor = ConsoleColor.Green;
    
    Console.Clear();
    
    Console.WriteLine("Hello World");
    
    Console.ReadLine();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have console app A that references another console app B. B app has
I've got a simple object post that has two NSMutableArrays as properties. One is
I have a console application which has target .NET 2.0 It is very short
var test = { } $(test).on(testEvent, function (){ console.log(testEvent has fired); }); $.event.trigger(testEvent); I
I have a large textfile, which has linebreaks at column 80 due to console
Console dogs me. Can anybody help? The sad story starts like this. My OS
I have a .NET console application that needs to generate some HTML files. I
Scenario: I have a console application that needs to access a network share with
I've got a console app that loads up a datatable; I'd like to export
While testing a console app, I set the properties of the console window to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.