I have an animation of a needle going from left to right. So as the needle Animates in a semi circle, the Mask follows the animation of the needle revealing the background image. The problem I'm having is, the mask is awkwardly animating, stalling, & having parts of it delayed, the transition is not correct or smooth. I have a file to share which could make it easier to understand if someone can have a look at it.
My 2 cents, using shaders... not sure if the rainbow was part of the question...
The quadrant is made from a 1cm height rectangle, array modifier and simple deform (bend) modifier.
Array is 285 steps. 285 is tuned after the bend modifier has been set up so that the arc has the good size.
The transparency is driven by the height in Z (from zero to 285). So the value node is keyframed appropriately. Don't forget to activate transparency if using Eevee.
The (optional) rainbow is the height (Z) clamped between 0 and 1. Z divided by 285.