Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinearPoint ¶
LinearPoint takes two colors and a float64, `p`, representing a position between them. It returns the colour represented by position `p` assuming a linear interpolation between the two colors. The position `p` is capped to the range `0 <= p <= 1`.
Example ¶
a := color.RGBA{0xFF, 0x00, 0x00, 0xFF} b := color.RGBA{0x00, 0x00, 0xFF, 0xFF} c := LinearPoint(a, b, 0.5) fmt.Printf("#%02x%02x%02x @ %02x", c.R, c.G, c.B, c.A)
Output: #80007f @ ff
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.