diff options
| author | Brandon C. Irizarry <brandon.irizarry@gmail.com> | 2026-03-05 21:24:09 -0500 |
|---|---|---|
| committer | Brandon C. Irizarry <brandon.irizarry@gmail.com> | 2026-03-05 21:24:09 -0500 |
| commit | 95c756e854b1e9fa5aaa44893a1c7370ac1edcfb (patch) | |
| tree | 83a1a734c7b284bc612b364ed02f0e9b9182ae01 | |
| parent | 1426e9064a07ec2b779d71bf5f097bd9a655be72 (diff) | |
feat: change colors to green on black
| -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 |
