fatih / color

Color package for Go (golang)
https://pkg.go.dev/github.com/fatih/color
MIT License
7.26k stars 615 forks source link

Feature request : colorizing the stdin - keyboard input in the terminal #72

Closed bhargavbhegde7 closed 7 years ago

bhargavbhegde7 commented 7 years ago

Please consider adding this feature for colorizing the keyboard input too.

fatih commented 7 years ago

Can you please give more information on what you want ?

bhargavbhegde7 commented 7 years ago

It would be great if there was a way to set custom color for the input text. I am using bufio.NewReader(os.Stdin).ReadString('\n') to get the user input from the keyboard in a console application, and I don't see a way to achieve this.

fatih commented 7 years ago

You can force to enable the color with color.NoColor = false, which overrides the automatic detection, and thus enables color for you. Thanks.