Localized electronic defects on the surface of a 4 monolayer (ML) thin MgO(001) film deposited on Ag(001) have been investigated by low-temperature scanning tunneling microscopy and spectroscopy. Depending on the location of the defect, we observe for the first time different defect energy levels in the band gap of MgO. The charge state of defects can be manipulated by interactions with the scanning tunneling microscope tip. Comparison with ground state energy levels of color centers on the MgO surface obtained from embedded cluster calculations corroborates the assignment of the defects to singly and doubly charged color centers.