col8

package
v0.0.0-...-f0e6d84 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package col8 provides an 8-bit color type Col8.

Index

Constants

This section is empty.

Variables

View Source
var Col8Model color.Model = color.ModelFunc(col8Model)

Col8Model is the color.Model for the Col8 type.

Functions

This section is empty.

Types

type Col8

type Col8 uint8

Col8 is an 8-bit color type, with 2-bit channels in the layout aaRRGGBB. Alpha values are inverted, to allow their omission to result in full opacity.

func (Col8) RGBA

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

RGBA returns the alpha-premultiplied red, green, blue and alpha values for the color. Each value ranges within [0, 0xffff], but is represented by a uint32 so that multiplying by a blend factor up to 0xffff will not overflow.

An alpha-premultiplied color component c has been scaled by alpha (a), so has valid values 0 <= c <= a.

Jump to

Keyboard shortcuts

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