color

package
v0.0.0-...-6b91a8d Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2014 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NGrayAlphaModel color.Model = color.ModelFunc(nGrayAlphaModel)
	R8Model         color.Model = color.ModelFunc(r8Model)
	RGBModel        color.Model = color.ModelFunc(rgbModel)
	RGB565Model     color.Model = color.ModelFunc(rgb565Model)
	NRGBA4444Model  color.Model = color.ModelFunc(nRGBA4444Model)
	NRGBA5551Model  color.Model = color.ModelFunc(nRGBA5551Model)
	NBGRA8888Model  color.Model = color.ModelFunc(nBGRA8888Model)
)

Models for GL color types

Functions

This section is empty.

Types

type NBGRA8888

type NBGRA8888 struct {
	// contains filtered or unexported fields
}

NBGRA8888 represents a 64-bit non-alpha-premultiplied color, having 8 bits for each of red, green, blue and alpha.

func (NBGRA8888) RGBA

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

type NGrayAlpha

type NGrayAlpha struct {
	G, A uint8
}

NGrayAlpha represents a 16-bit non-alpha-premultiplied color, having 8 bits for each of grayscale and alpha.

func (NGrayAlpha) RGBA

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

type NRGBA4444

type NRGBA4444 struct {
	Value uint16
}

NRGBA4444 represents a 16-bit non-alpha-premultiplied color, having 4 bits for each of red, green, blue and alpha.

func (NRGBA4444) RGBA

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

type NRGBA5551

type NRGBA5551 struct {
	Value uint16
}

NRGBA5551 represents a 16-bit non-alpha-premultiplied color, having 5 bits for each of red, green, blue and 1 bit for alpha.

func (NRGBA5551) RGBA

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

type R8

type R8 struct {
	R uint8
}

R8 represents a 8-bit opaque color with only red channel

func (R8) RGBA

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

type RGB

type RGB struct {
	R, G, B uint8
}

RGB represents a 24-bit opaque color, having 8 bits for each of red, green and blue

func (RGB) RGBA

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

type RGB565

type RGB565 struct {
	RGB uint16
}

RGB565 represents a 16-bit opaque color, having 5 bits for red, blue and 6 bits for green.

func (RGB565) RGBA

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

Jump to

Keyboard shortcuts

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