Open dveeden opened 2 years ago
The UI was not adjusted for light color consoles, how would you think if we add a dark background for those light colored chars?
package main
import (
"bufio"
"fmt"
"os"
"golang.org/x/crypto/ssh/terminal"
)
func main() {
reader := bufio.NewReader(os.Stdin)
s, _ := terminal.MakeRaw(int(os.Stdin.Fd()))
fmt.Printf("\x1b]11;?\a")
c := make([]byte, 23)
reader.Read(c)
terminal.Restore(int(os.Stdin.Fd()), s)
fmt.Printf("Terminal Color: %s\n", c[5:])
}
This results in:
Black background:
$ ./bgcolor
Terminal Color: rgb:0000/0000/0000
White background:
$ ./bgcolor
Terminal Color: rgb:ffff/ffff/ffff
Yellow background:
$ ./bgcolor
Terminal Color: rgb:ffff/ffff/dddd
We can use this to either select more appropriate colors or to set color.NoColor = true
.
The UI was not adjusted for light color consoles, how would you think if we add a dark background for those light colored chars?
That might move the problem as dark colors on a dark background might not be very readable as well. I think we should choose the right colors depending on the background color.
However a slightly darker color might work well enough on both white and black backgrounds.
Bug Report
On CentOS 7 with the default terminal configuration the light-yellow on white as seen here is hard to read:
What version of Diag are you using (
tiup diag --version
)?