Need a Code for my Gesture control Project

Hello i am newbie in using Arduino and this is my first post in this forum.
i am looking for a code for my project i am making a project to control home appliances using a Camera and Arduino, when i show blue card to camera it should turn on the bulb and when i show red card it should turn it off.
i will be very thankful if some one provide me that code

I think, you can use color sensor, if distance is not an issue. Some sellers, like SFE or Adafruit have a sample code, you may download for start

That sounds like a job for a PC, a web cam and OpenCV, with the Arduino just used to turn the lamp on and off under the control of the PC. Since the Arduino part is by far the easiest part of this project I recommend you get the other parts working first.