My question involves a traffic ticket from the state of California. As I approached an intersection, the light turned yellow. I stopped with my wheels slightly over the crosswalk line. (There were no pedestrians present.) A motorcycle officer was two lanes over on my left. He looked over, but did nothing. Shortly after, a second motorcycle officer pulled up next to the first one and they began talking. The second officer looked over at me, then motioned for me to roll down my window. He said, "You didn't stop. I'm going to give you a ticket." Obviously, I was stopped.
The light was still red and I was not in the intersection. After the light turned green, I drove through the intersection and pulled over. He gave me a ticket for VC 21453 (A) - failure to stop at a red light.
The code says "A driverfacing a steady circular red signal alone shall stop at a marked limit line, but if none, before entering the crosswalk on the near side of the intersection or, if none, then before entering the intersection, and shall remain stopped until an indication to proceed is shown, except as provided in subdivision (b)."
The light was not red when I stopped, it was yellow. I chose to stop on the yellow rather than to enter the intersection and risk running the red. The officer was not present when I did stop. The officer who was present did not ticket me.
Was I incorrectly cited?

