Conversation
24-bit support depends on System.Drawing for parsing HTML color strings.
|
Interesting... so a question maybe for @lzybkr: is it expected that the |
lzybkr
left a comment
There was a problem hiding this comment.
256 color/24 bit color support is in the Creators update - hopefully hitting RTM soon. You can try out insiders builds to see it working - there's nothing special about it in PowerShell, see https://twitter.com/lzybkr/status/779069905136037888
src/AnsiUtils.ps1
Outdated
| $AnsiEscape = [char]27 + "[" | ||
|
|
||
| [Reflection.Assembly]::LoadWithPartialName('System.Drawing') > $null | ||
| $ColorTranslatorType = ([System.Management.Automation.PSTypeName]'System.Drawing.ColorTranslator').Type |
There was a problem hiding this comment.
This should be
$ColorTranslatorType = 'System.Drawing.ColorTranslator' -as [Type]|
Regarding If you set fore/background colors via escape sequences, then I believe If you set fore/background colors via a specific Win32 api, I think Ideally ANSI would have push/pop semantics, but that doesn't exist unfortunately. |
|
@lzybkr so from posh-git's standpoint, then, would you agree that it is most correct for us to continue using I guess what confuses me most is the distinction between |
|
Merged so I can more easily bring |

This PR adds support for colors beyond
[ConsoleColor]:[byte]color values are processed as as Xterm 256 colors[System.Drawing.Color]color values are processed as 24-bit colors[string]values are parsed as HTML color values and processed as 24-bit colorsIncludes #454 for adjusting
Write-Promptsemantics, updated for 1.0 changes.24-bit support currently depends on System.Drawing. Not sure what Core options are there, but I've tried to make the assembly/type loading resilient.
Usage
I have tried testing with ConEmu, but 256-color mode doesn't seem to be working? Or is that a limitation of PS v5?
