adding jet as a generator
This commit is contained in:
parent
c599f1a2a2
commit
3f046bbba1
3 changed files with 43 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue