Versions in this module Expand all Collapse all v0 v0.4.1 Nov 21, 2022 v0.4.0 May 14, 2022 Changes in this version type Color + func FromStdColor(c color.Color) Color v0.3.1 Apr 27, 2022 v0.3.0 Apr 22, 2022 Changes in this version + func SetLogger(newlogger logger.Logger) v0.2.1 Feb 29, 2020 v0.2.0 Feb 29, 2020 Changes in this version + var Palette []RGB + func PaletteColorNames() []string + type Color interface + Equal func(c Color) bool + HSL func() HSL + HSV func() HSV + RGB func() RGB + RGBA func() (r, g, b, a uint32) + func FromColor(c color.Color) Color + type HSL struct + H uint16 + L uint8 + S uint8 + func (c HSL) Equal(col Color) bool + func (c HSL) HSL() HSL + func (c HSL) HSV() HSV + func (c HSL) RGB() RGB + func (c HSL) RGBA() (r, g, b, a uint32) + func (l HSL) IsSame(r HSL) bool + type HSV struct + H uint16 + S uint8 + V uint8 + func (hv HSV) Equal(col Color) bool + func (hv HSV) HSL() HSL + func (hv HSV) HSV() HSV + func (hv HSV) IsSame(r HSV) bool + func (hv HSV) Lerp(to HSV, t float32) HSV + func (hv HSV) RGB() RGB + func (hv HSV) RGBA() (r, g, b, a uint32) + type Mode int + const Ct + const Effect + const Hs + func ParseMode(name string) (Mode, error) + func (i Mode) String() string + type PaletteColor int + const Black + const Blue + const Cyan + const CyanBlue + const CyanGreen + const DarkGray + const Gray + const Green + const LightGray + const Magenta + const MagentaRed + const Orange + const Purple + const Red + const Transparent + const White + const Yellow + const YellowGreen + func Colors() []PaletteColor + func ParsePaletteColor(name string) (PaletteColor, error) + func (c PaletteColor) Equal(col Color) bool + func (c PaletteColor) HSL() HSL + func (c PaletteColor) HSV() HSV + func (c PaletteColor) Lerp(to Color, t float32) Color + func (c PaletteColor) RGB() RGB + func (c PaletteColor) RGBA() (r, g, b, a uint32) + func (i PaletteColor) String() string + type RGB color.RGBA + func (rc RGB) Equal(r Color) bool + func (rc RGB) HSL() HSL + func (rc RGB) HSV() HSV + func (rc RGB) IsSame(r RGB) bool + func (rc RGB) Lerp(to Color, t float32) RGB + func (rc RGB) Lightness() uint8 + func (rc RGB) RGB() RGB + func (rc RGB) RGBA() (r, g, b, a uint32)