Documentation ¶
Overview ¶
Package color represents ranges of red, green, and blue in the range of [0, 1].
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Color ¶
A Color is represented by percentages of red, green, and blue in the range of [0, 1]. The red, green, or blue values of a color may be lower or higher than [0, 1].
func Multiply ¶
Multiply returns a new Color with rgb values set to the product of the passed Color rgb values.
func Scale ¶
Scale returns a new Color with each of its rgb values multiplied by the passed scalar value.
func Subtract ¶
Subtract returns a new Color with rgb values set to the difference of the passed Color rgb values.
func (*Color) Add ¶
Add modifies this Color by adding each of the passed Color's rgb values to this Color's rgb values.
func (*Color) Multiply ¶
Multiply modifies this Color by multiplying each of the passed Color's rgb values against this Color's rgb values.