Describe the feature request
You could add a function for Custom coloring
Example:
func CustomColoring(foreground string, background string, s any, bold bool, underline bool) string {
b, u := "", ""
if bold {
b = Bold
}
if underline {
u = Underline
}
return Colorize(b+u+foreground+background, s)
}
Usage:
log.Println(color.CustomColoring(color.White, color.Black, s, false, false))
log.Println(color.CustomColoring(color.White, color.Black, s, true, false))
log.Println(color.CustomColoring(color.White, color.Black, s, false, true))
log.Println(color.CustomColoring(color.Black, color.White, s, true, true))
or
func CustomColoring(foreground string, background string, s any, bold string, underline string) string {
return Colorize(bold+underline+foreground+background, s)
}
Usage:
log.Println(color.CustomColoring(color.White, color.Black, s, "", ""))
log.Println(color.CustomColoring(color.White, color.Black, s, color.Bold, ""))
log.Println(color.CustomColoring(color.White, color.Black, s, "", color.Underline))
log.Println(color.CustomColoring(color.Black, color.White, s, color.Bold, color.Underline))
Result:

Why do you personally want this feature to be implemented?
I already implemented
How long have you been using this project?
one year
Additional information
No response
Describe the feature request
You could add a function for Custom coloring
Example:
Usage:
or
Usage:
Result:
Why do you personally want this feature to be implemented?
I already implemented
How long have you been using this project?
one year
Additional information
No response