Color sensor for long distances (about 5 cm), does it exist?

Hello guys, i've made a line follower robot recently, and i used five TCRT5000 reflective sensors to detect the black line.
However, those sensors only work when they are up to 1cm from the ground, then they start to fail a lot.That made me wonder if there is any color sensor that can work well at greater distances from the ground.

PS: i've seen this type of sensor once in LEGO robots.

I'd try opto-mechanical tuning. Put tubes around the diodes, so that the outgoing light is concentrated on a small spot, and returns light only from that spot. You'll have to try a bit, unless you can make the IR light visible.