Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

True color mode isn't enabled until something is echo'd and resets when cls (powershell) #1597

Closed
Thraka opened this issue Jun 6, 2018 · 2 comments

Comments

@Thraka
Copy link

Thraka commented Jun 6, 2018

Versions

ConEmu build: 180528 x64
OS version: Windows 10 x64
Used shell version: PowerShell 5

Problem description

After testing bug #1569 I found that this bug is fixed, but the truecolor doesn't seem to exist on the console until after something "turns it on" but I'm not sure what. If I run (Get-Gradient -StartColor 70 -EndColor 75 -Width 10) to output a color gradient (from the Pansies module) it is not in truecolor. If I run some sort of ansi sequence though, truecolor is suddenly working. This code seems to enable it:

Write-Output '�[9999S�[9999;1H'

Statements

  • If I Get-Content on the 256 ansi color file that ships with ConEmu, truecolor is suddenly enabled.
  • If at anytime I call Clear-Host, truecolor is reset back to 16 colors.

Steps to reproduce

  1. Install the Pansies module

    Install-Module Pansies -AllowClobber
  2. Run (Get-Gradient -StartColor 70 -EndColor 75 -Width 10) and you'll see that truecolor is not working.

  3. Run an ansi sequence and you'll see that truecolor is working:

    get-content .\ConEmu\Addons\AnsiColors256.ans; (Get-Gradient -StartColor 70 -EndColor 75 -Width 10)

    You'll see that the output of Pansies displays true color.

    pansies1

  4. Run the following

    Clear-Host; (Get-Gradient -StartColor 70 -EndColor 75 -Width 10)

    You'll see that the true color is gone

    pansies2

Actual results

Truecolor is only enabled when something outputs ansi codes, and is disabled when Clear-Host is called.

Expected results

Truecolor is enabled from the start.

@Maximus5
Copy link
Owner

Maximus5 commented Jun 6, 2018

gh-227

This is one of the most frustrating things in my RoadMap

@Thraka
Copy link
Author

Thraka commented Jun 6, 2018

Thanks for your quick replies. Keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants