colorf

package
v0.0.0-...-b64226d Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CoderBGRA32 = coderBGRA32{}
View Source
var NRGBAfModel color.Model = color.ModelFunc(nrgbafModel)
View Source
var RGBAfModel color.Model = color.ModelFunc(rgbafModel)

Functions

func ColorOver

func ColorOver(dc, sc color.Color) color.Color

func MustParseColor

func MustParseColor(s string) color.Color

func ParseColor

func ParseColor(s string) (color.Color, error)

Types

type Coder

type Coder interface {
	Size() int
	Encode(bs []byte, c color.Color) error
	Decode(bs []byte) (color.Color, error)
}

type NRGBAf

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

NRGBAf represents a non-alpha-premultiplied color.

func (NRGBAf) RGBA

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

type RGBAf

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

RGBAf represents a alpha-premultiplied color.

func (RGBAf) RGBA

func (c RGBAf) 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