Sensor color

Is there any color sensor on visual compenent ? Or any other methode to recognise colors ?
For more details : its about a capacitor and i have to check its orientation via the white line on it side .
Thanks

If you just need the orientation then you can simply cheat in the simulation by using a component sensor and a Python script that reads the component’s position matrix.

See vcComponent, vcMatrix in the Python API reference.

I didn’t get it ! Any exmple ?
And What kind of components sensor do you mean ?
And i know that i can cheat the orientation usuing the position of components yet i am simulating a real factory robot so i neee it to be real !