fcolor

package
v0.0.0-...-ac0f134 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RGBAModel = color.ModelFunc(rgbaModel)
View Source
var RGBModel = color.ModelFunc(rgbModel)

Functions

This section is empty.

Types

type RGB

type RGB struct {
	R, G, B float64
}

func LerpRGB

func LerpRGB(c0, c1 RGB, t float64) RGB

t=[0..1] t=0, c0 t=1, c1 t=0.5, (c0 * 0.5) + (c1 * 0.5)

func MixRGB

func MixRGB(cs []RGB) RGB

func SinerpRGB

func SinerpRGB(c0, c1 RGB, t float64) RGB

func (RGB) MarshalJSON

func (c RGB) MarshalJSON() ([]byte, error)

func (RGB) Norm

func (c RGB) Norm() RGB

func (RGB) RGBA

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

func (*RGB) UnmarshalJSON

func (c *RGB) UnmarshalJSON(data []byte) error

type RGBA

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

func (RGBA) Over

func (a RGBA) Over(b RGBA) RGBA

Alpha blending c = a over b

func (RGBA) RGBA

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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