colour sensor code outlined