diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,13 +11,13 @@ import ( ) var palette = []color.Color{ - color.White, color.Black, + color.RGBA{0x00, 0xff, 0x00, 0xff}, } const ( - whiteIndex = iota - blackIndex + backgroundIndex = iota + foregroundIndex ) func main() { @@ -55,7 +55,7 @@ func newImage(size, cycles int, phase, res, freq float64) *image.Paletted { for t := 0.0; t < float64(cycles)*2*math.Pi; t += res { x := math.Sin(t) y := math.Sin(t*freq + phase) - img.SetColorIndex(size+int(x*float64(size)+0.5), size+int(y*float64(size)+0.5), blackIndex) + img.SetColorIndex(size+int(x*float64(size)+0.5), size+int(y*float64(size)+0.5), foregroundIndex) } return img |
