Vignette/Brightness Adjustment and RGB-Channels in Siril (aka color artifacts after flat substraction or gradient removal)

I am having the problem that my compact camera (Sony RX100) has a very, very odd and strong form of vignetting. If I correct this with flats or the gradient removal tool, some rather odd rainbow colors are introduced instead. Please see attached pictures with vignette and after flat/gradient removal in Siril:

183061106_3496721213762809_6604274886746079274_n

182863128_3496717650429832_2846731448433373212_n

I was wondering what model Siril uses to correlate a desired change in brightness to adapt the individual RGB channels. Imho, to half the brightness of a pixel to correct the vignette, one should not just reduce each RGB value by 1/2.

See also this discussion: https://stackoverflow.com/questions/596216/formula-to-determine-perceived-brightness-of-rgb-color

How is this handled in Siril and is there a difference between working with bayered and debayered data?

Your problem is that you have a flat issues. This kind of issue is never corrected by gradient removal. Never.

Our background extraction uses polynomial function to create a synthetic background on each channel separately.