Documentation
¶
Index ¶
Constants ¶
View Source
const ( ColorBrightGreen = "#44CC11" ColorGreen = "#97CA00" ColorYellowGreen = "#A4A61D" ColorYellow = "#DFB317" ColorOrange = "#FE7D37" ColorRed = "#E05D44" ColorBlue = "#007EC6" ColorGrey = "#555555" ColorLightGrey = "#9F9F9F" )
Named colors of the shields.io palette. https://github.com/badges/shields/blob/7d452472defa0e0bd71d6443393e522e8457f856/badge-maker/lib/color.js#L8-L12
Variables ¶
This section is empty.
Functions ¶
func ColorToHexRGB ¶
ColorToHexRGB return Hex RGB from color.Color.
func ParseColor ¶ added in v0.80.0
ParseColor resolves a color name or a hex RGB notation to a hex RGB color.
func ValidateIcon ¶ added in v0.80.0
ValidateIcon reports whether an image is one a badge can embed, which is what a caller asks before it has a badge to add the icon to.
Types ¶
type Badge ¶
type Badge struct {
Label string
Message string
LabelColor string
MessageColor string
Icon []byte
// contains filtered or unexported fields
}
func (*Badge) AddIconFile ¶
AddIconFile add icon image file to badge.
func (*Badge) SetLabelColor ¶
func (*Badge) SetMessageColor ¶
Click to show internal directories.
Click to hide internal directories.