fig

package
v1.10.41 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorBlack   = AnsiColor{30}
	ColorRed     = AnsiColor{31}
	ColorGreen   = AnsiColor{32}
	ColorYellow  = AnsiColor{33}
	ColorBlue    = AnsiColor{34}
	ColorMagenta = AnsiColor{35}
	ColorCyan    = AnsiColor{36}
	ColorWhite   = AnsiColor{37}
)

Terminal AnsiColors

View Source
var TrueColorForAnsiColor = map[AnsiColor]TrueColor{
	ColorBlack:   {0, 0, 0},
	ColorRed:     {255, 65, 54},
	ColorGreen:   {149, 189, 64},
	ColorYellow:  {255, 220, 0},
	ColorBlue:    {0, 116, 217},
	ColorMagenta: {177, 13, 201},
	ColorCyan:    {105, 206, 245},
	ColorWhite:   {255, 255, 255},
}

TrueColorForAnsiColor is TrueColor lookalikes for displaying AnsiColor f.e. with the HTML parser Colors based on http://clrs.cc/

Functions

This section is empty.

Types

type AnsiColor

type AnsiColor struct {
	// contains filtered or unexported fields
}

AnsiColor representation

func (AnsiColor) GetPrefix

func (ac AnsiColor) GetPrefix() string

func (AnsiColor) GetSuffix

func (ac AnsiColor) GetSuffix() string

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func (*Builder) Append

func (b *Builder) Append(msg string, font string, color Color) error

func (*Builder) String

func (b *Builder) String() string

type Color

type Color interface {
	// GetPrefix returns prefix for ansi color
	GetPrefix() string
	// GetSuffix returns suffix for ansi color
	GetSuffix() string
}

Color has a pre- and a suffix

type TrueColor

type TrueColor struct {
	// contains filtered or unexported fields
}

TrueColor with rgb Attributes

func NewTrueColorFromHexString

func NewTrueColorFromHexString(c string) (*TrueColor, error)

NewTrueColorFromHexString returns a TrueColor object based on a hexadecimal string

func (TrueColor) GetPrefix

func (tc TrueColor) GetPrefix() string

func (TrueColor) GetSuffix

func (tc TrueColor) GetSuffix() string

Jump to

Keyboard shortcuts

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