A black ceramic coating with high absorptivity and emissivity was successfully prepared on TA7 (Ti‐5Al‐2.5Sn) in a hybrid electrolyte solution by plasma electrolytic oxidation for improving the imaging precision of optical system. The influence of electrolyte components and technical parameters on the composition, structure, and optical properties was investigated. The results show the coatings with typically porous structure are mainly composed of O, P, Si, Ti, V, Fe, and Ni. The corresponding amorhous oxide in the outer layer endows the coating with strong absorption in the visible light and infrared areas, and the crystallized TiO2 indwelling the inner layer contributes to the strong UV absorption property. In addition, the micropores of the coatings have different size ranges corresponding to the wavelengths, facilitating the increase of absorptivity and emissivity in some degree. The absorptivity and emissivity can be adjusted by electrolyte components and technical parameters. The coating presents the best absorptivity of 0.962 and emissivity of 0.950 in the electrolyte solution of 3 g/L NH4VO3, 5 g/L FeSO4, and 5 g/L C4H6O4Ni under 400 V for 10 minutes.