Hi Frank.
Just solved another part of the puzzle, which will help explain how it works...
The lightened area on the right I complained about is actually the darkened rainbow obscuring the cloud behind so rather than looking at my mask I should have been looking at the cloud settings.
[attach=1]
So on to how it "works"
The lighting effect is created by setting the cloud colour to a primary or secondary colour and then increasing the colour number to something extremely high (the latter restricts this to using only white, red, green, blue, cyan, magenta and yellow). In conjunction with this, you need to use a very low cloud density, with a balance between the colour value and cloud density controlling the brightness. The other key setting is turn GI on the cloud off.
[attach=2][attach=3]
The intensity of the rendered colour then depends on the amount of light striking the cloud. When there is no light, there is no colour, just a "blank" cloud. With a very low density then, take away the colour and the cloud practically disappears which is what a rainbow is supposed to do.
The rainbow then, is made up of 7 cloud layers, using all of the available colours, with masks to control the distribution and overlaps to mix the colours.
The masks use some simple trigonometry. I create a vector from the camera pointing in the opposite direction of the sun and a vector from the camera to get(position) and calculate the angle between the two vectors. Colour adjust shaders set the boundaries using the desired angles in degrees which removes a lot of the brain strain. So you effectively have a conical mask with the camera at the apex. The good thing about this is that the rainbow is always at a realistic position and can be animated quite easily as you only have to enter the altitude and heading of the sun.
There are a few other complications with limiting the depth of the rainbow and maintaining an adequate minimum density for smooth gradation of colour across the rainbow, but that's the crux of it. There is an earlier TGD you can explore in this post:
http://www.planetside.co.uk/forums/index.php?topic=14805.msg144346#msg144346