Color cycling, also known as palette shifting or palette animation, is a technique used in computer graphics in which colors are changed in order to give the impression of animation. This technique was used in early video games, as storing one image and changing its palette requires less memory and processor power than storing multiple frames of animation ...
See this article from wikipedia.
... this technique is old and was used in the old games as well, but it is more significant in the Dune games where it is first shown with a rainbow and then used as environmental degradation ... nowadays dedicated lighting techniques are used on video card.