color

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Opaque      = color.Opaque
	Transparent = color.Transparent
)

Default colors.

View Source
var (
	RGBAModel   = color.RGBAModel
	RGBA16Model = color.RGBAModel
)

Color models.

Functions

This section is empty.

Types

type Color

type Color = color.Color

Type aliases.

type Model

type Model = color.Model

Type aliases.

type Palette

type Palette = color.Palette

Type aliases.

type RGB24

type RGB24 struct {
	R, G, B uint8
}

RGB24 is a color with 8-bit red, green and blue channels.

func DecodeRGB24

func DecodeRGB24(r io.Reader) (RGB24, error)

DecodeRGB24 decodes one RGB24 color from the supplied Reader.

func (RGB24) RGBA

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

RGBA returns the alpha-premultiplied red, green, blue and alpha values for the color.

type RGBA16

type RGBA16 uint16

RGBA16 is a color with 4-bit red, green, blue and alpha channels.

func DecodeRGBA16

func DecodeRGBA16(r io.Reader, byteOrder binary.ByteOrder) (RGBA16, error)

DecodeRGBA16 decodes one RGBA16 color from the supplied Reader.

func (*RGBA16) ByteSwap

func (c *RGBA16) ByteSwap()

ByteSwap swaps the endianness of the color.

func (RGBA16) RGBA

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

RGBA returns the alpha-premultiplied red, green, blue and alpha values for the color.

Jump to

Keyboard shortcuts

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