fmtColor

package module
v0.0.0-...-75d3d90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 2 Imported by: 0

README

FMTCOLOR LIBRARY FOR ECLA

Go Report Card

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

Index

Constants

This section is empty.

Variables

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}
)

Functions

func Print

func Print(c color.Color, values ...any)

Print prints the values in the given color

func PrintRGB

func PrintRGB(r uint8, g uint8, b uint8, values ...any)

PrintRGB prints the values in the given color

func Printf

func Printf(c color.Color, format string, values ...any)

Printf prints the values in the given color and formats them

func PrintfRGB

func PrintfRGB(r uint8, g uint8, b uint8, toFormat string, values ...any)

PrintfRGB prints the values in the given color and formats them

func Printfln

func Printfln(c color.Color, format string, values ...any)

Printfln prints the values in the given color, formats them and adds a newline

func PrintflnRGB

func PrintflnRGB(r uint8, g uint8, b uint8, toFormat string, values ...any)

PrintflnRGB prints the values in the given color, formats them and adds a newline

func Println

func Println(c color.Color, values ...any)

Println prints the values in the given color and adds a newline

func PrintlnRGB

func PrintlnRGB(r uint8, g uint8, b uint8, values ...any)

PrintlnRGB prints the values in the given color and adds a newline

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL