Documentation ¶
Overview ¶
Package colorcode provides color space definitions and methods to convert between them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HSL ¶
type HSL struct {
H, S, L float64
}
HSL represents a color in the HSL coordinate system, having 8 bits for each of hue, saturation, and luminosity. Implements fmt.Stringer
func NewHSL ¶
NewHSL returns a new HSL object constructured out of the values given to the constructor function
type HSV ¶
type HSV struct {
H, S, V float64
}
HSV represents a color in the HSV color space. This also implements the fmt.Stringer interface
type HexCode ¶
type HexCode string
HexCode represents an HTML color string. Implements fmt.Stringer
func NewHexCode ¶
NewHexCode returns a new HexCode built out of a string
type RGB ¶
type RGB struct {
R, G, B uint8
}
RGB represents a traditional 24-bit color, having 8 bits for each of red, green, and blue. Implements fmt.Stringer
func NewRGB ¶
NewRGB returns a new RGB object constructured out of the values given to the constructor function