Added ANSI colors
This commit is contained in:
2
Color.go
2
Color.go
@ -40,7 +40,7 @@ func (c Color) Print(args ...any) {
|
||||
fmt.Printf("\x1b[38;2;%d;%d;%dm%s\x1b[0m", byte(c.R*255), byte(c.G*255), byte(c.B*255), fmt.Sprint(args...))
|
||||
}
|
||||
|
||||
// Print writes the text in the given color to standard output.
|
||||
// Printf formats according to a format specifier and writes the text in the given color to standard output.
|
||||
func (c Color) Printf(format string, args ...any) {
|
||||
if !Terminal {
|
||||
fmt.Printf(format, args...)
|
||||
|
Reference in New Issue
Block a user