I haven’t used that sensor, looks plausible. The way you handle detection, which hole that is, and color could be done either by having multiple color sensors or as you suggest one kind of thing to see which hole, and one color reading place.
I would gather some practical experience with the color sensor to see how it might work for either purpose.
I see prices for that sensor all over the map, and there would have to be some other detection at the entry points, so budget might enter into it.
The example code I found should be easy to work with and will let you deal at a higher level with a simple color determination.
There’s more that will depend on exactly how your ball travels through the mechanism. Like if there is time to “see” the ball, or any possibility of one getting ahead of and therefor mixed up with another.
So you could tell us more about that part.
You didn’t say what the score display or any other functions will be. For development purposes, those can be a separate effort entirely, you can get something working the logic just using the serial monitor to print messages that woukd eventually be on a real display; similarly some things can be handled with serial input from the serial monitor taking the place of hardware parts yet unknown.
a7