A common means of doing this is via an “invert colours” feature, which flips the bits that make up the pixels on the screen, and you end up with a screen where all the colours are the opposite—white turns to black, light colours turn to dark colours.
What is the point of invert colors?
You can invert the colours on your device to a make it easier to read by enabling the Colour Inversion setting. This will increase The contrast between text, images and the background. Often this means the text will become white text over a black background.
Is colors invert better for eyes?
The original purpose of inverting display colours is to help those with impaired vision to make out items on screen by improving contrast, and is used alongside the zoom function. But it's also useful for giving your eyes a bit of a rest as it's not as bright thanks to the darker colours used.