Documentation ¶
Index ¶
- Constants
- func GetLuminance(r, g, b byte, normalized bool) float64
- func Hex2Rgb(hex string) (byte, byte, byte)
- func Hsl2Rgb(h, s, l float64) (byte, byte, byte)
- func Hsv2Rgb(h, s, v float64) (byte, byte, byte)
- func Rgb2Hex(r, g, b byte) string
- func Rgb2Hsl(r, g, b byte) (float64, float64, float64)
- func Rgb2Hsv(r, g, b byte) (float64, float64, float64)
- type Color
- func (this Color) Equal(c Color) bool
- func (this Color) EqualTolerant(c Color, t byte) bool
- func (this Color) H() float64
- func (this Color) HSL() (float64, float64, float64)
- func (this Color) HSV() (float64, float64, float64)
- func (this Color) Hex() string
- func (this Color) HexWithAlpha() string
- func (this Color) Hue() float64
- func (this Color) L() float64
- func (this Color) Lightness() float64
- func (this Color) RGB() (byte, byte, byte)
- func (this Color) RGBA() (byte, byte, byte, byte)
- func (this Color) S() float64
- func (this Color) SL() float64
- func (this Color) SV() float64
- func (this Color) SaturationL() float64
- func (this Color) SaturationV() float64
- func (this Color) SetH(h float64)
- func (this Color) SetHSL(h, s, l float64)
- func (this Color) SetHSV(h, s, v float64)
- func (this Color) SetHex(s string)
- func (this Color) SetL(l float64)
- func (this Color) SetLightness(l float64)
- func (this Color) SetRGBA(r, g, b, a byte)
- func (this Color) SetS(s float64)
- func (this Color) SetSL(s float64)
- func (this Color) SetSV(s float64)
- func (this Color) SetSaturationL(s float64)
- func (this Color) SetSaturationV(s float64)
- func (this Color) SetV(v float64)
- func (this Color) SetValue(v float64)
- func (this Color) Uint32() uint32
- func (this Color) V() float64
- func (this Color) Value() float64
Constants ¶
View Source
const ( LUMINANCE_R = 0.299 LUMINANCE_G = 0.587 LUMINANCE_B = 0.114 )
Variables ¶
This section is empty.
Functions ¶
func GetLuminance ¶
Types ¶
type Color ¶
func NewColorHSL ¶
func NewColorHSV ¶
func NewColorHexString ¶
func NewColorRGBA ¶
func NewColorUint32 ¶ added in v0.1.40
func (Color) HexWithAlpha ¶
func (Color) SaturationL ¶
func (Color) SaturationV ¶
func (Color) SetLightness ¶
func (Color) SetSaturationL ¶
func (Color) SetSaturationV ¶
Click to show internal directories.
Click to hide internal directories.