The large intrinsic band gap in TiO2 has hindered severely its potential application for visible-light irradiation, while anion doping has led to decreases in visible-light photocatalytic activity in spite of narrowing the host band gap. In this study, we have used cation-passivated codoping of Mo with Zn/Cd and also of Ta with Ga/In to modify the band edges of anatase-TiO2 to extend absorption to longer visible-light wavelengths using the generalized Kohn-Sham theory with the Heyd-Scuseria-Ernzerhof (HSE06) hybrid functional for exchange and correlation. It has been found that (Mo, Zn/Cd)-codoped systems can narrow the band gap significantly and passivate gap states. Considering the host and impurity ionic radii, it is expected that Mo with Zn should constitute the best cationic dopant pair.