Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HSB ¶
HSB stands for hue, saturation and brightness
Example ¶
hsb := NewHSB(color.RGBA{R: 79, G: 24, B: 23}) fmt.Println(hsb.AsInts())
Output: 1 180 79
type HSBA ¶
type HSBA struct { H int // hue, from 0 to 360 S, B float64 // saturation, brightness, from 0 to 1 A float64 // alpha, from 0 to 1 }
HSBA stands for hue, saturation, brightness and alpha
Example ¶
h := &HSBA{H: 1, B: 71, S: 31, A: 1.0} rgba := h.RGBA() fmt.Println(rgba)
Output: {185 221 82 255}
func NewFromFloats ¶
NewFromFloats takes hue, saturation, brightness and alpha as four floats and returns a pointer to an HSBA struct
func (*HSBA) AsInts ¶
AsInts returns the hue, saturation, brightness and alpha values as four integers, from 0 to 360, 0 to 255, 0 to 255 and 0 to 255
func (*HSBA) WithoutAlpha ¶
Return the color as HSB, without Alpha
Click to show internal directories.
Click to hide internal directories.