Applying materials

Im programming a 3ds file loader, but I have a doubt in some details. If Im not wrong, material info is composed of an RGB color (3 bytes) and sometimes also contains an image file name. The problem is that I dont know how to apply a texture and then a color to the same polygon. Can somebody ilustrate this with a simple code or something?

maybe you should learn some basics about lighting and texturing. It would take a lot of space to explain this here, and there is a lot of documentation about it.