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 ¶
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.
Click to show internal directories.
Click to hide internal directories.