Get color from line trace when it hits object

You mean the material?