pixel: maze.io/x/pixel/pixelcolor Index | Files

package pixelcolor

import "maze.io/x/pixel/pixelcolor"

Package pixelcolor contains common color formats.

Index

Package Files

color.go color_table.go doc.go

Variables

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.

func ToXRGB1555 Uses

func ToXRGB1555(c color.Color) color.Color

type ARGB1555 Uses

type ARGB1555 uint16

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

func ToARGB1555 Uses

func ToARGB1555(c color.Color) ARGB1555

func (ARGB1555) RGBA Uses

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

type ARGB2101010 Uses

type ARGB2101010 uint32

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

func ToARGB2101010 Uses

func ToARGB2101010(c color.Color) ARGB2101010

func (ARGB2101010) RGBA Uses

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

type ARGB2222 Uses

type ARGB2222 uint8

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

func ToARGB2222 Uses

func ToARGB2222(c color.Color) ARGB2222

func (ARGB2222) RGBA Uses

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

type ARGB3332 Uses

type ARGB3332 uint16

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

func ToARGB3332 Uses

func ToARGB3332(c color.Color) ARGB3332

func (ARGB3332) RGBA Uses

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

type ARGB4444 Uses

type ARGB4444 uint16

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

func ToARGB4444 Uses

func ToARGB4444(c color.Color) ARGB4444

func (ARGB4444) RGBA Uses

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

type ARGB6565 Uses

type ARGB6565 uint32

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

func ToARGB6565 Uses

func ToARGB6565(c color.Color) ARGB6565

func (ARGB6565) RGBA Uses

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

type ARGB8888 Uses

type ARGB8888 uint32

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

func ToARGB8888 Uses

func ToARGB8888(c color.Color) ARGB8888

func (ARGB8888) RGBA Uses

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

type Bit Uses

type Bit bool

Bit is a 1-bit color.

const (
    Off Bit = false
    On  Bit = true
)

Bit values.

func ToBit Uses

func ToBit(c color.Color) Bit

func (Bit) RGBA Uses

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

type RGB332 Uses

type RGB332 uint8 // 3-3-2 RGB

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

func ToRGB332 Uses

func ToRGB332(c color.Color) RGB332

func (RGB332) RGBA Uses

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

type RGB565 Uses

type RGB565 uint16 // 5-6-5 RGB

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

func ToRGB565 Uses

func ToRGB565(c color.Color) RGB565

func (RGB565) RGBA Uses

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

type RGB888 Uses

type RGB888 struct {
    R, G, B uint8
}

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

func ToRGB888 Uses

func ToRGB888(c color.Color) RGB888

func (RGB888) RGBA Uses

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

type RGBA1010102 Uses

type RGBA1010102 uint32

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

func ToRGBA1010102 Uses

func ToRGBA1010102(c color.Color) RGBA1010102

func (RGBA1010102) RGBA Uses

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

type RGBA2222 Uses

type RGBA2222 uint8

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

func ToRGBA2222 Uses

func ToRGBA2222(c color.Color) RGBA2222

func (RGBA2222) RGBA Uses

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

type RGBA3323 Uses

type RGBA3323 uint16

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

func ToRGBA3323 Uses

func ToRGBA3323(c color.Color) RGBA3323

func (RGBA3323) RGBA Uses

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

type RGBA4444 Uses

type RGBA4444 uint16

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

func ToRGBA4444 Uses

func ToRGBA4444(c color.Color) RGBA4444

func (RGBA4444) RGBA Uses

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

type RGBA5551 Uses

type RGBA5551 uint16

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

func ToRGBA5551 Uses

func ToRGBA5551(c color.Color) RGBA5551

func (RGBA5551) RGBA Uses

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

type RGBA5656 Uses

type RGBA5656 uint32

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

func ToRGBA5656 Uses

func ToRGBA5656(c color.Color) RGBA5656

func (RGBA5656) RGBA Uses

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

type RGBX5551 Uses

type RGBX5551 uint16

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

func ToRGBX5551 Uses

func ToRGBX5551(c color.Color) RGBX5551

func (RGBX5551) RGBA Uses

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

type XRGB1555 Uses

type XRGB1555 uint16

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

func (XRGB1555) RGBA Uses

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

Package pixelcolor imports 1 packages (graph) and is imported by 1 packages. Updated 2020-08-21. Refresh now. Tools for package owners.