The colour of the image formed by a pinhole camera will be the same as that of the object's.
So the students can see the image of the magnets without any change in the color from the actual magnets.
Therefore, the colour of the images will remain blue and red respectively.