Old school monitors and television sets work differently from the modern ones. They have what is called a cathode ray tube (CRT) inside, which works by shooting electrons to the front to create a picture. However, the electron beams can be deflected by magnetic fields. To prove this, you can use a small fridge magnet to see how it modifies the image by deflecting the electron beam going to the front.
If you have a colour television set, there are three beams for red, blue and green information. Deflecting all three beams will cause rainbow patterns to appear on the screen because the beams are deflected onto dots that they are not supposed to hit. To fix this problem, you will need a degaussing coil.
A degaussing coil is a device that generates alternating magnetic fields back and forth, back and forth, sixty times a second. You simply plug it into the wall socket and turn it on using the power switch on the side. When you turn it on and put it close to the monitor, you can see some patterns forming. Slowly but surely, you move it backward a little at a time until you reach the point where you can turn off the degaussing coil.
Using the degaussing coil will get rid of the purity error, which is when the colours are not the same from one side of the screen to the other or top to bottom. If you have magnetized the shadow mask with a fridge magnet, the degaussing coil is the best way to fix the problem. It is a simple and effective way to ensure you have a fixed TV set.