.png-8 bit and .
gif both support 256 colours total. You're choosing colours outside their gamut, and so you're getting dithering as the exporter tries to match your colour - you can set different kinds of dither, and may find that "diffusion" is more random and therefor a bit less noticeable - or you could stick to colours within the 8-bit colour 256 tones gamut and skip this issue entirely.
If you limit your choices to one of these, your
.gif will not need to dither:
.gifs can technically include considerably more colours than the basic 256 you get from 8-bit (8x8x8) by both customising the
gif colour palette and setting separate colour blocks in the
.gif (you can set up a
.gif to allow each colour block to support its own unique custom palette) but that's typically way beyond the scope of a simple exporter interface.
Hope this helps.