What is the name of this moving color pixels effect, for animating a painting?
This effect is called Color Cycling (or Palette Shifting). Mark Ferrari has a great GDC talk where he demonstrates and explains the entire technique. You can view a bunch of his artwork based on this technique here.
The main idea is that each pixel is painted not with a single color, but as values of a look-up table to a palette of colors. The entire image then cycles through the palettes frame by frame. Assigning colors to each palette to create the illusion of movement requires a fair bit of artistry. Mark Ferrari does this in a software called Pro Motion, but this can be coded in a shader pretty easily.