color64

package
v0.0.0-...-3626a0a Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Different

func Different(c1, c2 Color64, thresh float64) bool

Different returns true if the distance between the given colors is greater than thresh.

Types

type Color64

type Color64 [3]float64

Color64 represents an RGB color with each compenent a flaot64.

func (Color64) Add

func (c Color64) Add(other Color64) Color64

Add does a component-wise addition.

func (Color64) B

func (c Color64) B() float64

B returns the blue component.

func (Color64) G

func (c Color64) G() float64

G returns the green component.

func (Color64) Mul

func (c Color64) Mul(val float64) Color64

Mul multiplies each component by val.

func (Color64) NRGBA

func (c Color64) NRGBA() color.NRGBA

NRGBA returns the color.NRGBA equivalent of the Color64. The components are clamped between 0.0 and 1.0 and treated as a percent of 255.

func (Color64) R

func (c Color64) R() float64

R returns the red component.

Jump to

Keyboard shortcuts

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