color

package
v0.0.0-...-b05aa3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Color32Model color.Model = color.ModelFunc(color32Model)
View Source
var HSLModel color.Model = color.ModelFunc(hslModel)

Functions

This section is empty.

Types

type Color32

type Color32 struct {
	R, G, B, A uint8
}

func FromBGR32

func FromBGR32(c uint32) Color32

func Parse

func Parse(s string) Color32

func (Color32) HSL

func (cr Color32) HSL() HSL

func (Color32) NRGBAf

func (cr Color32) NRGBAf() (r, g, b, a float32)

func (Color32) RGBA

func (c Color32) RGBA() (r, g, b, a uint32)

RGBA in range 0~65535, implement color.Color interface

func (Color32) String

func (cr Color32) String() string

type HSL

type HSL struct {
	H, S, L, A float32
}

func (HSL) Color32

func (hsl HSL) Color32() Color32

func (HSL) NRGBAf

func (hsl HSL) NRGBAf() (r, g, b, a float32)

NRGBAf reports RGBA components in range 0~1.0

func (HSL) RGBA

func (hsl HSL) RGBA() (r, g, b, a uint32)

RGBA in range 0~65535, implement color.Color interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL