We study the off-shell mixing and renormalization of flavor-diagonal dimension-5 T- and P-odd operators involving quarks, gluons, and photons, including quark electric dipole and chromo-electric dipole operators. We present the renormalization matrix to one-loop in the $bar{rm MS}$ scheme. We also provide a definition of the quark chromo-electric dipole operator in a regularization-independent momentum-subtraction scheme suitable for non-perturbative lattice calculations and present the matching coefficients with the $bar{rm MS}$ scheme to one-loop in perturbation theory, using both the naive dimensional regularization and t Hooft-Veltman prescriptions for $gamma_5$.