auralgo How can I recover the color component from the FIT files?
The first thing you should do is to use a FITS Header inspector to check if the file is encoded as color (post debayer) or as raw (pre debayer).
You should be able to find a parameter in the header called NAXIS. If NAXIS is equal to 2, the FITS file has only two dimensions: x (width) and y (height) of the image. If NAXIS is equal to 3, then the image is stored in the FITS file as a color image, i.e., X, y and an RGB vector for each x,y location.
I suspect that the image that is saved is the raw format. I.e., a monochomatic file (each x,y location has only one scalar pixel value), where some of the pixels has the red information, some pixels have only green value, and some pixels have only blue values).
If it is a raw image that represents a color image (through Bayer mosaic), the program that processes the FITS image will need to deBayer the raw image -- i.e., try to reassemble (with loss of resolution) the original color image.
The FITS header does not have a default way to specify that it is a raw file that represents a color image, or what the Bayer pattern looks like. You can add such metadata (the FITS format is flexible, that is what the "F" in fits stand for), but unless the processing program is compliant with that metadata, it will not debayer it for you; i.e., the program will treat it as a 1-component (grayscale) image.
If so, you need to force the program to deBayer and tell the program if it is a RGGB array or BGGR, or whatever pattern the camera uses.
In AstroPixelProcessor, for example, you turn on the "Force CFA" flag ("CFA" is color filter array -- another name for a the Bayer mosaic). ASIFitsView has an icon that looks like a 2x2 array -- if it is gray, the program treats the image as a monochrome image, if it has red, green and blue sub squares, it applies deBayering. Clicking on that icon toggles between deBayering and not deBayering.
In short, if NAXIS in the header is 2, check the documentation of the program that you use to read the FITS file, and find out how to force it to deBayer for you.
Chen