detect red and green