Documentation ¶
Index ¶
- Variables
- type Color
- func (c Color) Add(d Color) Color
- func (c Color) Clamp(min, max float64) Color
- func (c Color) DivColor(d Color) Color
- func (c Color) DivScalar(s float64) Color
- func (c Color) MultColor(d Color) Color
- func (c Color) MultScalar(s float64) Color
- func (c Color) Pow(e float64) Color
- func (c Color) Scale(s float64) Color
- func (c Color) ScaleDown(s float64) Color
- func (c Color) ScaleUp(s float64) Color
- func (c Color) ToRGBA() color.RGBA
- func (c Color) ToRGBA64() color.RGBA64
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorBlack = Color{0.0, 0.0, 0.0}
ColorBlack is a simple reference to an all-black Color
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color struct { Red float64 `json:"red"` Green float64 `json:"green"` Blue float64 `json:"blue"` }
Color is a light abstraction on a Vector, with translations to and from various representations from the core color library
func (Color) MultScalar ¶
MultScalar multiplies a Color by a scalar
func (Color) ScaleDown ¶
ScaleDown scales as Scale does, but only if the max channel is greater than s
Click to show internal directories.
Click to hide internal directories.