Hi, first I would avoid using 2D arrays for storing pixels and such, that's
not even a Go thing, (although Go internal library uses a 1D array for
storing pixels of images), even in C or C++ a 1D array is recomended, it is
faster to say the least and more efficient.
img[x][y] becomes img[y*widt
You could define the colors higher in the package - right now you are
allocating them every time, but they are not changing. You could also also
retain the image and simply wipe and rewrite it every time as long as it is
not happening in a goroutine in multiple places - if so, you could retain