badge

package
v0.62.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 20 Imported by: 0

README

badge

Package for rendering badges.

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

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

AddIcon add icon image to badge.

func (*Badge) AddIconFile

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

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

func (*Badge) SetMessageColor

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