Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I reset the powershell colors

I changed the colors of the powershell and now I can't change the color of the input text, is always yellow.

I changed the color of the background and the color of the text

changing colors

The color of the background changed correctly but in the display text the color still is yellow.

changed

Can I do something to reset the colors?

like image 836
elvaqueroloconivel1 Avatar asked Nov 22 '15 20:11

elvaqueroloconivel1


People also ask

How do I reset PowerShell back to default?

1: Reset PowerShell or Command Prompt to Default Settings If you know what setting you changed, you can revert by right-clicking on the top of a Powershell or Command Prompt window and click on Properites. Look for the setting you want to change. If you're not sure what was changed, click on Defaults.

How do I reset my command prompt to default color?

If you want Windows 10 to reset CMD's colors to their defaults, you need to delete the Console key from the Windows Registry. Right-click or tap and hold on Console and select Delete from the contextual menu. Confirm that you want to delete this key and all its subkeys.

How do I change colors in PowerShell?

To change the background color of the font, you can use the GUI and command line both. With GUI − Colors → Screen Background. You will notice that the background color of the text has been changed to DarkBlue.

How do I make PowerShell blue?

Click on Windows PowerShell (or PowerShell if you use PowerShell 7). Click the Appearance tab. Under the “Text” section, use the Color scheme drop-down menu and select the Campbell PowerShell option. Click the Save button in the bottom-right corner.


2 Answers

This resets the console colors (e.g., [Console]::BackgroundColor): (Paste in the powershell console)

[Console]::ResetColor() 
like image 115
Xin Avatar answered Sep 18 '22 22:09

Xin


I realize this is an old question, but I found it in Google and have another solution.

Set-PSReadlineOption -TokenKind Command -ForegroundColor Black 

Source

This will change the input text to black. The available color choices are as follows:

  • Black
  • DarkBlue
  • DarkGreen
  • DarkCyan
  • DarkRed
  • DarkMagent
  • DarkYellow
  • Gray
  • DarkGray
  • Blue
  • Green
  • Cyan
  • Red
  • Magenta
  • Yellow
  • White

You can make this persist by adding it to your profile. It's enough to append the command to the end of the file.

In my case the profile is in: C:\Users\Billy\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

To get the location of your PS profile type:

$profile 

If this file doesn't exist, you can create it with:

New-item –type file –force $profile 

(source)

To see the current settings in your profile, use:

Get-PSReadlineOption 

(source)

like image 36
William Brawner Avatar answered Sep 19 '22 22:09

William Brawner