2025-06-06 13:51:43 -05:00
2025-06-06 13:51:43 -05:00
2024-08-28 09:00:01 -05:00
2025-06-06 13:51:43 -05:00
2025-06-06 13:51:43 -05:00
2025-06-06 13:51:43 -05:00
2024-08-28 09:37:42 -05:00
2024-08-28 09:37:42 -05:00
2024-08-28 09:00:01 -05:00
2025-06-06 13:51:43 -05:00

Color

Supported colors: red, green, yellow, blue, purple, cyan, white, gray

fmt.Print(color.Blue("Blue text"))
fmt.Printf("Status: %s\n", color.Green("OK"))
fmt.Println(color.Red("Error occurred"))

blue := color.Blue("Blue text")
warning := color.Yellow("Warning message")

color.SetColors(false)
color.SetColors(true)

if color.ColorsEnabled() {
    // ...
}

Colors are automatically detected based on terminal capabilities and environment variables (NO_COLOR, FORCE_COLOR, TERM).

Description
Basic package for CLI colors!
Readme MIT 31 KiB
2025-06-06 13:54:07 -05:00
Languages
Go 100%