A study of color centers in MgO using a hierarchical model