title: Custom powershell backgroundcolor reverts when running commands?
body: <p>I'm using a powershell profile to change the background color of the powershell console (to black) when its running as my superuser account, or based on other criteria. I do this simply by setting the following variables in my profile ps1.</p>
  
  <pre><code>$host.ui.rawui.backgroundcolor = "black"
  $host.ui.rawui.foregroundcolor = "white"
  </code></pre>
  
  <p>Console windows using this profile open with a black background, and the initial prompt is white text with a black background. Hitting <code>Enter</code> without typing anything doesn't change this.</p>
  
  <p>However as soon as I enter any text whatsoever, the background color of the typed text, the prompts, and any output (except for errors) reverts to being the default white on navy blue. The overall console background remains black.</p>
  
  <p>Reloading the profile with <code>. .\path\profile.ps1</code> or manually resetting the <code>$host</code> variables (as above) reverts the prompt to white on black, but the same behavior happens again. The most bizarre thing is that even typing text then backspacing it and entering nothing still causes the prompt to revert to navy.</p>
  
  <p>Is there any way to <em>actually</em> have a pure black background, or is this just a limitation of the powershell console (v5.1 btw)?</p>
  
  <p>I've seen some references to other color-related variables, but I don't see how they are helpful in this regard:</p>
  
  <pre><code>$host.PrivateData.ErrorForegroundColor
  $host.PrivateData.ErrorBackgroundColor
  $host.PrivateData.WarningForegroundColor
  $host.PrivateData.WarningBackgroundColor
  $host.PrivateData.DebugForegroundColor
  $host.PrivateData.DebugBackgroundColor
  $host.PrivateData.VerboseForegroundColor
  $host.PrivateData.VerboseBackgroundColor
  $host.PrivateData.ProgressForegroundColor
  $host.PrivateData.ProgressBackgroundColor
  </code></pre>
  
  <p>P.S. I'd post an image, but my prompt and stuff has personal info in it. I sure can't wait for the fancy new Terminal MS announced last month. I can only hope it's far less cumbersome than this.</p>