mirtel81 wrote: when i take a picture in a bad lighting, it changes colors
Well, yeah-- that's why it's called "bad lighting." The color of an object depends on the light shining on it. Neutral colors will appear redder when red light is used. (Brown can just mean a dull red.) The camera tries really hard to adjust, but if the lighting is poor, there's a limit to what it can do. That's why photographers us studio lights, or perhaps a flash. There is also some adjustment available in Edit Mode in Photos. Try adjusting the Warmth.
Another method is to take a really long exposure so more light gets in the camera, but that can't work well if things, like the subject or the camera, move. Some iPhones have a night mode to allow you to do that.
Take Night mode photos with your iPhone camera - Apple Support (ZA)