pixelcolor

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 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)
	RGBA2222Model    = color.ModelFunc(rgba2222Model)
	RGBA3323Model    = color.ModelFunc(rgba3323Model)
	RGBA4444Model    = color.ModelFunc(rgba4444Model)
	RGBA5551Model    = color.ModelFunc(rgba5551Model)
	RGBX5551Model    = color.ModelFunc(rgbx5551Model)
	RGBA5656Model    = color.ModelFunc(rgba5656Model)
	RGBA8888Model    = color.RGBAModel
	RGBA1010102Model = color.ModelFunc(rgba1010102Model)
	ARGB1555Model    = color.ModelFunc(argb1555Model)
	ARGB2222Model    = color.ModelFunc(argb2222Model)
	ARGB3332Model    = color.ModelFunc(argb3332Model)
	ARGB4444Model    = color.ModelFunc(argb4444Model)
	ARGB6565Model    = color.ModelFunc(argb6565Model)
	ARGB8888Model    = color.ModelFunc(argb8888Model)
	ARGB2101010Model = color.ModelFunc(argb2101010Model)
	XRGB1555Model    = color.ModelFunc(xrgb1555Model)
)

Color models supported by this package.

Functions

func ToXRGB1555 added in v0.1.4

func ToXRGB1555(c color.Color) color.Color

Types

type ARGB1555 added in v0.1.4

type ARGB1555 uint16

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

func ToARGB1555 added in v0.1.4

func ToARGB1555(c color.Color) ARGB1555

func (ARGB1555) RGBA added in v0.1.4

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

type ARGB2101010 added in v0.1.4

type ARGB2101010 uint32

ARGB2101010 is a 32-bit RGB color with alpha channel.

func ToARGB2101010 added in v0.1.4

func ToARGB2101010(c color.Color) ARGB2101010

func (ARGB2101010) RGBA added in v0.1.4

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

type ARGB2222 added in v0.1.4

type ARGB2222 uint8

ARGB2222 is a 8-bit RGB color with alpha channel.

func ToARGB2222 added in v0.1.4

func ToARGB2222(c color.Color) ARGB2222

func (ARGB2222) RGBA added in v0.1.4

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

type ARGB3332 added in v0.1.4

type ARGB3332 uint16

ARGB3332 is a 11-bit RGB color with alpha channel.

func ToARGB3332 added in v0.1.4

func ToARGB3332(c color.Color) ARGB3332

func (ARGB3332) RGBA added in v0.1.4

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

type ARGB4444 added in v0.1.4

type ARGB4444 uint16

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

func ToARGB4444 added in v0.1.4

func ToARGB4444(c color.Color) ARGB4444

func (ARGB4444) RGBA added in v0.1.4

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

type ARGB6565 added in v0.1.4

type ARGB6565 uint32

ARGB6565 is a 22-bit RGB color with alpha channel.

func ToARGB6565 added in v0.1.4

func ToARGB6565(c color.Color) ARGB6565

func (ARGB6565) RGBA added in v0.1.4

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

type ARGB8888 added in v0.1.4

type ARGB8888 uint32

ARGB8888 is a 32-bit RGB color with alpha channel.

func ToARGB8888 added in v0.1.4

func ToARGB8888(c color.Color) ARGB8888

func (ARGB8888) RGBA added in v0.1.4

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

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 RGBA1010102 added in v0.1.4

type RGBA1010102 uint32

RGBA1010102 is a 32-bit RGB color with alpha channel.

func ToRGBA1010102 added in v0.1.4

func ToRGBA1010102(c color.Color) RGBA1010102

func (RGBA1010102) RGBA added in v0.1.4

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

type RGBA2222 added in v0.1.4

type RGBA2222 uint8

RGBA2222 is a 8-bit RGB color with alpha channel.

func ToRGBA2222 added in v0.1.4

func ToRGBA2222(c color.Color) RGBA2222

func (RGBA2222) RGBA added in v0.1.4

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

type RGBA3323 added in v0.1.4

type RGBA3323 uint16

RGBA3323 is a 8-bit RGB color with alpha channel.

func ToRGBA3323 added in v0.1.4

func ToRGBA3323(c color.Color) RGBA3323

func (RGBA3323) RGBA added in v0.1.4

func (c RGBA3323) 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)

type RGBA5656 added in v0.1.4

type RGBA5656 uint32

RGBA5656 is a 22-bit RGB color with alpha channel.

func ToRGBA5656 added in v0.1.4

func ToRGBA5656(c color.Color) RGBA5656

func (RGBA5656) RGBA added in v0.1.4

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

type RGBX5551 added in v0.1.4

type RGBX5551 uint16

RGBX5551 is a 16-bit RGB color without alpha channel.

func ToRGBX5551 added in v0.1.4

func ToRGBX5551(c color.Color) RGBX5551

func (RGBX5551) RGBA added in v0.1.4

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

type XRGB1555 added in v0.1.4

type XRGB1555 uint16

XRGB1555 is a 16-bit RGB color without alpha channel.

func (XRGB1555) RGBA added in v0.1.4

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

Jump to

Keyboard shortcuts

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