The easiest way is to use HSV color values instead of traditional RGB. See
G.HSVToColor. If you set up a tick/think/whatever function to set the color of the entity every frame, you'll only need to increment the Hue value based on time. You could do that by storing your own variable and incrementing it manually, or just use the current time:
HSVToColor( CurTime() % 360, 1, 1 )
.. Or something like that.
EDIT: You probably want to use RealTime() instead of CurTime(), as it appears that CurTime() is synced to the server, where RealTime() is not. CurTime() therefore could get out of sync or have lag issues, RealTime() should remain smooth on the clients.