It would be really great, you could choose more colors. The sensor also recognizes black, blue and cyan (green) as far as I could see. I also think it would be great if it were possible to enter the distance manually, not just <3, <7, <30 and >30. Then it might be enough to implement only the "<".
A question: When exactly does the event of a sensor fire in your implementation? Only if the color/distance actually changes? Or every time the sensor measures the selected color/distance? In other words: Does the event "Change Color To Yellow" fire even if yellow was already detected?
Everything else is almost perfect. Many thanks for your work.