package
module
Version:
v0.0.0-...-75d3d90
Opens a new window with list of versions in this module.
Published: Apr 12, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
FMTCOLOR LIBRARY FOR ECLA

fmtColor is a simple package that allows you to print colored text in the terminal.
Candidate functions :
Func Name |
Prototype |
Description |
Comments |
PrintRGB |
PrintRGB(r, g, b int, text string) {} |
Prints text in the given color |
N/A |
PrintlnRGB |
PrintlnRGB(r, g, b int, text string) {} |
Prints text in the given color and adds a newline |
N/A |
PrintfRGB |
PrintfRGB(r, g, b int, format string, values ...any) {} |
Prints the values in the given color and formats them |
N/A |
PrintflnRGB |
PrintflnRGB(r, g, b int, format string, values ...any) {} |
Prints the values in the given color, formats them and adds a newline |
N/A |
Print |
Print(c color.Color, values ...any) {} |
Prints the values in the given color |
N/A |
Println |
Println(c color.Color, values ...any) {} |
Prints the values in the given color and adds a newline |
N/A |
Printf |
Printf(c color.Color, format string, values ...any) {} |
Prints the values in the given color and formats them |
N/A |
Printfln |
Printfln(c color.Color, format string, values ...any) {} |
Prints the values in the given color, formats them and adds a newline |
N/A |
Available colors :
Color Name |
RGB Color Code |
Red |
255, 0, 0 |
Green |
0, 255, 0 |
Blue |
0, 0, 255 |
Yellow |
255, 255, 0 |
Cyan |
0, 255, 255 |
Magenta |
255, 0, 255 |
White |
255, 255, 255 |
Black |
0, 0, 0 |
Documentation
¶
- Variables
-
func Print(c color.Color, values ...any)
-
func PrintRGB(r uint8, g uint8, b uint8, values ...any)
-
func Printf(c color.Color, format string, values ...any)
-
func PrintfRGB(r uint8, g uint8, b uint8, toFormat string, values ...any)
-
func Printfln(c color.Color, format string, values ...any)
-
func PrintflnRGB(r uint8, g uint8, b uint8, toFormat string, values ...any)
-
func Println(c color.Color, values ...any)
-
func PrintlnRGB(r uint8, g uint8, b uint8, values ...any)
View Source
var (
RED = color.RGBA{255, 0, 0, 255}
GREEN = color.RGBA{0, 255, 0, 255}
BLUE = color.RGBA{0, 0, 255, 255}
YELLOW = color.RGBA{255, 255, 0, 255}
CYAN = color.RGBA{0, 255, 255, 255}
MAGENTA = color.RGBA{255, 0, 255, 255}
WHITE = color.RGBA{255, 255, 255, 255}
BLACK = color.RGBA{0, 0, 0, 255}
)
Print prints the values in the given color
PrintRGB prints the values in the given color
Printf prints the values in the given color and formats them
PrintfRGB prints the values in the given color and formats them
Printfln prints the values in the given color, formats them and adds a newline
PrintflnRGB prints the values in the given color, formats them and adds a newline
Println prints the values in the given color and adds a newline
PrintlnRGB prints the values in the given color and adds a newline
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.