adding jet as a generator

This commit is contained in:
Will Charczuk 2017-04-15 09:59:37 -07:00
parent c599f1a2a2
commit 3f046bbba1
3 changed files with 43 additions and 1 deletions

View file

@ -57,6 +57,11 @@ func ColorFromAlphaMixedRGBA(r, g, b, a uint32) Color {
return c
}
// ColorChannelFromFloat returns a normalized byte from a given float value.
func ColorChannelFromFloat(v float64) uint8 {
return uint8(v * 255)
}
// Color is our internal color type because color.Color is bullshit.
type Color struct {
R, G, B, A uint8