f32color

package
v0.0.2-0...-1c7e8a7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MulAlpha

func MulAlpha(c color.NRGBA, alpha uint8) color.NRGBA

MulAlpha scales all color components by alpha/255.

Types

type RGBA

type RGBA struct {
	R, G, B, A float32
}

RGBA is a 32 bit floating point linear space color.

func RGBAFromSRGB

func RGBAFromSRGB(col color.RGBA) RGBA

RGBAFromSRGB converts from SRGBA to RGBA.

func (RGBA) Array

func (col RGBA) Array() [4]float32

Array returns rgba values in a [4]float32 array.

func (RGBA) Float32

func (col RGBA) Float32() (r, g, b, a float32)

Float32 returns r, g, b, a values.

func (RGBA) Opaque

func (col RGBA) Opaque() RGBA

Opaque returns the color without alpha component.

func (RGBA) SRGB

func (col RGBA) SRGB() color.RGBA

SRGB converts from linear to sRGB color space.

Jump to

Keyboard shortcuts

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