badge

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorToHexRGB

func ColorToHexRGB(c color.Color) string

ColorToHexRGB return Hex RGB from color.Color.

Types

type Badge

type Badge struct {
	Label        string
	Message      string
	LabelColor   string
	MessageColor string
	Icon         []byte
	// contains filtered or unexported fields
}

func New

func New(l, m string) *Badge

New returns *Badge.

func (*Badge) AddIcon added in v0.27.0

func (b *Badge) AddIcon(imgf []byte) error

AddIcon add icon image to badge.

func (*Badge) AddIconFile added in v0.27.0

func (b *Badge) AddIconFile(f string) error

AddIconFile add icon image file to badge.

func (*Badge) Render

func (b *Badge) Render(wr io.Writer) error

Render badge.

func (*Badge) SetLabelColor added in v0.45.2

func (b *Badge) SetLabelColor(c any) error

func (*Badge) SetMessageColor added in v0.45.2

func (b *Badge) SetMessageColor(c any) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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