Documentation ¶
Overview ¶
Package color implements an RGB color value and provides common utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Color ¶
type Color struct {
R, G, B float64
}
A Color represents an RGB color with component values between [0,1]. The zero value for Color is black.
func Clamp ¶
Clamp returns a Color whose component values are clamped between [0,1].
If a component value is less than 0, the component is set to 0. If it is greater than 1, the component is set to 1. Otherwise, the component is left unchanged.
func PiecewiseMult ¶
PiecewiseMult returns the component-wise product of two Colors.
Click to show internal directories.
Click to hide internal directories.