aboutsummaryrefslogtreecommitdiff
path: root/color.go
blob: ee818553ed055de3aa4cd5481cb2b3adadc03e72 (plain) (blame)
1
2
3
4
5
6
7
8
9

package main

type Color struct {
	r, g, b float64
}

func (color Color) ToPixel() Pixel {
	return Pixel{int(color.r * 255), int(color.g * 255), int(color.b * 255)}
}