badge

package
v0.43.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 18 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

Jump to

Keyboard shortcuts

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