I try to represent red and blue spheres moving in a tube, and render it with Cycles. I made a part of the tube opaque and another part semi-transparent following the "color based on height" trick. I get the following result, but I am anoyed by the color transition that takes place at the third sphere (from the bottom right). It does not seem to depend on the orientation of the sun.
I built a minimal working example, with a half-transparent cylinder and got the same effect. The corresponding Blender file can be found here. The effect is not present if the cylinder is opaque.
Do you have any idea where this effect come from and how can I avoid it?