Vision sensor but we couldnt use it


We decided to use vision sensor to our robot skills autonomous.So it will be more stable!
I am using block codes and i wanted to make some codes for the vision sensor.
But i couldnt understand whats the problem.When we run for the first time it spin like what we want but when we run for
the second it doesnt even touch the roller and keep going to the other codes and when we run it for the third it spin the roller
to wrong color.
And also i saw a video.whichever color’s area was bigger it change the sensor LED.I want to do something like that but i dont know how to.
The drawing is about our robot and the photo is about the video that i saw.

The vision sensor is a little overkill for this use, a better bet would be to use the simpler and smaller optical sensor. If you really wanted to use the vision sensor you would need to configure it and use the colors to spin the rolor. For example, spinning until the color blue is no longer detected.