Creating color images from QHY CCD sensor with fit files

I am having trouble producing a color image from the files directly out of my QHY ccd sensor. These files are fit and do not need conversion. I have set the bayer pattern to RGGB but tried different white balance settings but my rgb image comes out purple every time. I have processed my images in astro pixel processor and the colors are accurate… not purple. Any advice?

Yes, your acquisition software probably records image upside-down relative to the FITS standard, so the Bayer pattern is upside-down too. There is an option to manage that in siril, it depends which version you use.

I see there is a checkbox in the preferences to debayer fits files in up-bottom orientation. I’ve tried processing with that check and unchecked but still am getting purple images. I am processing using script. Here is my light frame script.

convertraw NGC7000-1_gain3200_0003_
preprocess NGC7000-1_gain3200_0003_ -dark=…/darks/Dark_0003_stacked -flat=…/flats/pp_flat_stacked -cfa -equalize_cfa -debayer -stretch

register pp_NGC7000-1_gain3200_0003_

stack r_pp_NGC7000-1_gain3200_0003_ rej 3 3 -norm=addscale -out=…/Final/Panel1_Expo3

Purple hue is always because of either a wrong orientation as @vinvin said or a wrong Bayer pattern.

ok I am sure I have the correct bayer pattern for the camera, would this make a difference if the sensor is full spectrum?

Checked and unchecked should not give the same result.

Please make a screenshot of your image.

This is with the box checked.

The orientation is definitely the issue. When I vertical flip the light frames the color is correct. Siril is reading the files incorrectly. When I open the same file in Pixinsight the frame is in the correct orientation. Could this be a bug?

No.
Take a look here: https://free-astro.org/index.php?title=Siril:FITS_orientation
In fact, Siril is reading the file correctly ;).

Great, thanks!