If you have red and green boxes, you should be able to identify them by sensing how much red or green light intensity reflects off of them. The deeper, darker red or green the boxes are, the better it will work. Most papers/cardboard have lots of reflective white pigment in the cellulose or in the red or green ink, or even white base oats of ink are used to make top coats of red or green ink "pop" a bit brighter. So, again, deep and darker shades of green and red will work better.
Green will reflect off of green but be absorbed by red. Red light will be reflected by red but absorbed by green. You should be able to get a significant (strong) signal difference.