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

Wrong background yellow on Windows 10 1903 #14

Closed
kotori2 opened this issue Aug 12, 2019 · 3 comments
Closed

Wrong background yellow on Windows 10 1903 #14

kotori2 opened this issue Aug 12, 2019 · 3 comments

Comments

@kotori2
Copy link

kotori2 commented Aug 12, 2019

Not sure whether it is a Windows issue or ansicolor issue.
Light yellow and white works fine, but yellow broke.
image

package main

import (
	"io"
	"os"
	"sync"

	"github.com/shiena/ansicolor"
)

type logWriter struct {
	sync.Mutex
	writer io.Writer
}

func newLogWriter(wr io.Writer) *logWriter {
	return &logWriter{writer: wr}
}

func main() {
	w := newLogWriter(ansicolor.NewAnsiColorWriter(os.Stdout))
	w.writer.Write([]byte("\x1b[43m Yellow"))
	w.writer.Write([]byte("\x1b[103m Light Yellow"))
	w.writer.Write([]byte("\x1b[47m White \x1b[0m"))
}
@shiena
Copy link
Owner

shiena commented Aug 12, 2019

@kotori2
It's probably a console color issue.
https://devblogs.microsoft.com/commandline/updating-the-windows-console-colors/

There is a tool for changing the color palette.
However, in my environment, it worked with cmd and PowerShell6, but the background color of PowerShell5 became strange.
https://github.com/Microsoft/Terminal/tree/master/src/tools/ColorTool
https://github.com/microsoft/terminal/releases/tag/1904.29002

@kotori2
Copy link
Author

kotori2 commented Aug 12, 2019

@shiena I think it is not a color palette issue. I tried to set color scheme with .\ColorTool campbell.ini or .\ColorTool cmd-legacy.ini but it still broke.
image
Also I tried with PS6 and cmd and they all works. But it seems white in PS5 is lighter than that in PS6 and cmd
image
after setting color scheme, all fonts became yellow in PS5
image
is that Microsoft's fault?

@shiena
Copy link
Owner

shiena commented Aug 12, 2019

It seems to be related to microsoft/terminal#23

@kotori2 kotori2 closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants