color

package
v0.0.0-...-381f291 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Reset  = "\033[0m"
	Bold   = "\033[1m"
	Dim    = "\033[2m"
	Italic = "\033[3m"
	Under  = "\033[4m"
)

ANSI color codes

View Source
const (
	Black   = "\033[30m"
	Red     = "\033[31m"
	Green   = "\033[32m"
	Yellow  = "\033[33m"
	Blue    = "\033[34m"
	Magenta = "\033[35m"
	Cyan    = "\033[36m"
	White   = "\033[37m"
)

Foreground colors

View Source
const (
	BrightBlack   = "\033[90m"
	BrightRed     = "\033[91m"
	BrightGreen   = "\033[92m"
	BrightYellow  = "\033[93m"
	BrightBlue    = "\033[94m"
	BrightMagenta = "\033[95m"
	BrightCyan    = "\033[96m"
	BrightWhite   = "\033[97m"
)

Bright foreground colors

Variables

This section is empty.

Functions

func Color256

func Color256(code int) string

256-color support

func ColoredPrintf

func ColoredPrintf(agentID, format string, args ...interface{})

ColoredPrintf prints formatted text with a colored agent prefix

func ColoredPrintln

func ColoredPrintln(agentID, text string)

ColoredPrintln prints text with a colored agent prefix and newline

func Colorize

func Colorize(text, color string) string

Colorize applies color to text

func FormatAgentPrefix

func FormatAgentPrefix(agentID string) string

FormatAgentPrefix formats the agent prefix with color

func GetAgentColor

func GetAgentColor(agentID string) string

GetAgentColor returns a consistent color for the given agent ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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