Vscode-powershell: Feature Request: Coloring the integrated console

Created on 21 Mar 2017  路  15Comments  路  Source: PowerShell/vscode-powershell

Hi,

I was wondering if it's possible to have the colors within integrated console match the colors of the default PowerShell console (like in ISE)?

Thanks,
Ivan

Most helpful comment

PowerShell ISE Theme pretty much nails this and I'm ok with closing this issue

All 15 comments

Hey Ivan, which colors are you referring to? Write-Verbose/Warning/Debug, etc? Or the colors for command input like what PSReadLine does?

I would prefer PSReadLine. Is there any working on making that happen? The PSReadLine integration that is.

I'm waiting on some changes to be merged to PSReadline first, then I'll be able to start on that.

@daviwil, I was thinking more of the background color of the whole console, as well as foreground and background colors for the Verbose, Debug, Error messages. I'm aware that PSReadline is a bit challenging at the moment and that some time would be needed, but having the console looking differently from the rest of the VSCode (and more like a standalone one) would make it look and feel more integrated.

@Glober777 IMO the right place to make this customization is in the Microsoft.VSCode_profile.ps1 profile script. You can get kind of close to what I "think" you want by editing your C:\Users\<username>\Documents\WindowsPowerShell\Microsoft.VSCode_profile.ps1 file. This is easily done in the Integrated Console by executing psedit $profile. Then add this to your profile:

$host.UI.RawUI.BackgroundColor = 'DarkBlue'
Clear-Host

When you first start the IC it won't show the desired background color e.g.:
image

But as you use it, the background will start to paint with the desired color. Well, except for the prompt background. I think that is probably a bug with the IC. @daviwil ?
image

Just wanted to give my +1 on the fact that the prompt is a different color (black) than the rest of the console on Linux (specifically CentOS 7). Let me know if you need any more info.

What if you run PowerShell directly in the terminal UI, same result?

Nope, if I execute powershell straight out of a VSCode /bin/bash terminal, it looks fine.

Thanks for confirming! I'll track that down.

Is this in the same realm as $host.PrivateData.ErrorForegroundColor?
For a standard PS Console, I like to set $host.PrivateData.ErrorForegroundColor = [System.ConsoleColor]::Green

I've added "workbench.colorCustomizations":{"errorForeground":"#008000"} to settings.json, but that doesn't seem to apply to the integrated console, which continues to display errors in red.

Match VSCode Powershell Integrated Console functionality with ISE-hosted command window ( syntax coloring and intellisense capabilities)

@AspenForester that would be covered by issue #571

define the terminal red to be green helps
"workbench.colorCustomizations":{"terminal.ansiBrightRed": "#008000"}

PowerShell ISE Theme pretty much nails this and I'm ok with closing this issue

PowerShell ISE Theme pretty much nails this and I'm ok with closing this issue

I was also looking for a better solution for this.

As mentioned by Glober777, you can find ISE theme here under View-> Command Palette -> Preferences:Color Theme -> Powershell ISE

This fixed the issue for me.

Was this page helpful?
0 / 5 - 0 ratings