Here is some rhetorical response:
Scan with what element? I presume you mean the color sensor thing? So do you intend that the sensor will move in relation to the barcode (like down the linear axis of the lined barcode? Or do you have a camera in your system somehow?
What is the formatting of the code you wish to read? There are many different encoding schemes of linear bar codes. Its important to know which scheme the code you intend to read is encoded using. I would think that at a minimum, one could find the spec for the encoding you wish to read, and write code to decipher that standard, of course, in the absence of a better way. Lets see what others offfer as well.
USB Barcode scanners with the encodings in the hardware of the scanner are available for cheap. They use laser that you point down the axis of the barcode. My understanding of their operation is that they are able to determine the encoding standard used automagically and simply return the content of the code via USB.