package hexcolor
import "go-hep.org/x/hep/groot/rsrv/internal/hexcolor"
Index ¶
Variables ¶
HexModel converts any Color to an Hex color.
Functions ¶
func HexToRGBA ¶
Converts an Hex string to RGBA. If alpha is not specified, it defaults to 255 If it is not a valid hexadecimal number of the right width, a horrible yellow color is returned
Types ¶
type Hex ¶
type Hex string
Hex represents an RGB color in hexadecimal format.
The length must be 3 or 6 characters, preceded or not by a '#'.
func RGBAToHex ¶
RGBAToHex converts an RGBA to a Hex string. If a == 255, the A is not specified in the hex string
func (Hex) RGBA ¶
RGBA returns the alpha-premultiplied red, green, blue and alpha values for the Hex.
Source Files ¶
hexcolor.go
- Version
- v0.37.1 (latest)
- Published
- Jun 3, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 9 hours ago –
Tools for package owners.