The jar you choose has to be at least 1 gallon in size. Moreover, there should be no labels attached and you should be able to clearly see through the jar. A large glass jar without any labels would work fine.
Completely fill the jar with clean water. Before you start to make the rainbow, place the water filled jar at a place where the entire jar can be seen clearly. Other may have to change their location in order to see the entire jar.
Carefully drop a very small dot of red food colouring into the jar. Dropping the colour would make it sink to the bottom instead of spreading uniformly through the water. Similarly, dropping the colour from a very small distance from the water surface would make the colour suspend at the top portion. For this reason, it is necessary to drop the colour from an average height.
After the drop of red food colouring, drop blue, yellow, and green coloured dots into the water filled jar. As before, make sure that you do it from an average distance above the water surface.
You may want to add other colour to the water filled jar if you want the colour to appear stronger. Alternatively, you use red, yellow, blue and green colours in a larger quantity if desired.
Allow some time for the colours to meander through the water. After a short while, you will see fun forms brewing into a rainbow inside the water filled glass jar. Make sure the jar remain stationary so that water in it does not move too much. This will ensure the formation of more beautiful fun forms and the shade inside the jar would last longer.