Best Looking Windows Color Library made for Go users!
go mod init bestcolorlib
go get github.com/EvilBytecode/GolangStyle/pkg
go run .
- Sample README that provides documentation for the functions in the GoStyle package.
- Description: Initializes the console, comes with simple error handle.
- Sample Usage:
if err := gostyle.Init(); err != nil {
gostyle.Write("Failed to init console:", gostyle.RED_TO_BLACK, false)
return
}
- Description: Clears the console. Anything currently displayed will be removed.
- Sample Usage:
gostyle.ClearConsole()
- Description: Hides the console cursor.
- Sample Usage:
gostyle.HideCursor()
- Description: Shows the console cursor.
- Sample Usage:
gostyle.ShowCursor()
- Description: Writes text to the console with an optional gradient and centers it based on your choice.
- Parameters:
text string
: Text to be written to the console.gradient gostyle.Gradient
: Optional gradient color for the text.true
: You Decide if it should be in center set true or false based on if you want the text to be centered or not.
- Sample Usage:
gostyle.Write("Your text here", gostyle.PURPLE_TO_BLUE, true)
- Description: Writes text to the console with a specified color and centers it based on your choice.
- Parameters:
text string
: Text to be written to the console.color string
: Color of the text (e.g., "red", "blue").true
: You Decide if it should be in center set true or false based on if you want the text to be centered or not.
- Sample Usage:
gostyle.WriteColorized("Your text here", "red", true)
Remember to import the gostyle
package before using these functions.
issues with some ascii styles will be fixed soon, i just need to find time for it. but most of them are supported
- https://github.com/MmCopyMemory (Lots of help)
- https://github.com/billythegoat356 (GoStyle Idea, From Python to Go)