pixelcolor

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package pixelcolor contains common color formats.

Index

Constants

This section is empty.

Variables

View Source
var (
	BitModel      = color.ModelFunc(bitModel)
	RGB332Model   = color.ModelFunc(rgb332Model)
	RGB565Model   = color.ModelFunc(rgb565Model)
	RGB888Model   = color.ModelFunc(rgb888Model)
	RGBA4444Model = color.ModelFunc(rgba4444Model)
	RGBA5551Model = color.ModelFunc(rgba5551Model)
)

Color models supported by this package.

Functions

This section is empty.

Types

type Bit

type Bit bool

Bit is a 1-bit color.

const (
	Off Bit = false
	On  Bit = true
)

Bit values.

func ToBit

func ToBit(c color.Color) Bit

func (Bit) RGBA

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

type RGB332

type RGB332 uint8 // 3-3-2 RGB

RGB332 is a 8-bit RGB color with no alpha channel.

func ToRGB332

func ToRGB332(c color.Color) RGB332

func (RGB332) RGBA

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

type RGB565

type RGB565 uint16 // 5-6-5 RGB

RGB565 is a 16-bit RGB color with no alpha channel.

func ToRGB565

func ToRGB565(c color.Color) RGB565

func (RGB565) RGBA

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

type RGB888

type RGB888 struct {
	R, G, B uint8
}

RGB888 is a 24-bit color with no alpha channel.

func ToRGB888

func ToRGB888(c color.Color) RGB888

func (RGB888) RGBA

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

type RGBA4444

type RGBA4444 uint16

RGBA4444 is a 16-bit RGB color with alpha channel.

func ToRGBA4444

func ToRGBA4444(c color.Color) RGBA4444

func (RGBA4444) RGBA

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

type RGBA5551

type RGBA5551 uint16

RGBA5551 is a 16-bit RGB color with alpha channel.

func ToRGBA5551

func ToRGBA5551(c color.Color) RGBA5551

func (RGBA5551) RGBA

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

Jump to

Keyboard shortcuts

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