This commit is contained in:
faiface 2016-11-24 16:06:33 +01:00
parent 5e909b3f88
commit ea2ed1bcd5
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ package pixel
import "image/color"
// colorToRGBA converts a color from image/color to RGBA components in interval [0, 1)
// colorToRGBA converts a color from image/color to RGBA components in interval [0, 1].
func colorToRGBA(c color.Color) (r, g, b, a float64) {
ri, gi, bi, ai := c.RGBA()
r = float64(ri) / 0xffff