Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = []uint32{
0xF5ABBAFF,
0x5ACFFAFF,
0xF5ABBAFF,
0xFFFFFFFF,
}
Functions ¶
func RandomColor ¶
func RandomColor() uint32
RandomColor returns a random 32-bit RGBA color from the known palette.
Types ¶
type Colored ¶
type Colored uint32
func NewColored ¶
NewColored makes a new color segment from a string and a 24-bit color.
func NewColorful ¶
func NewColorful(color colorful.Color) Colored
NewColorful returns a color segment from the given colorful.Color.
func NewRandomColored ¶
func NewRandomColored() Colored
NewRandomColored returns a random color segment.
type ColoredSegment ¶
type ColoredSegment struct { empty.TextSegment // contains filtered or unexported fields }
func NewColoredSegment ¶
func NewColoredSegment(str string, color uint32) ColoredSegment
func NewColorfulSegment ¶
func NewColorfulSegment(str string, color colorful.Color) ColoredSegment
func NewRandomColoredSegment ¶
func NewRandomColoredSegment(str string) ColoredSegment
func (ColoredSegment) AsColorer ¶
func (seg ColoredSegment) AsColorer() text.Colorer
func (ColoredSegment) Bounds ¶
func (seg ColoredSegment) Bounds() (start, end int)
Click to show internal directories.
Click to hide internal directories.