The numerical investigation of the optical properties of electrochromic WO3 inverted opal structure has been carried out with the help of plane wave expansion and finite difference time domain simulation methods. Electrochromic effect is incorporated through the tunable parameters of the frequency-dependent Drude dielectric function. Dependence of photonic bands on free electron density and radius of air spheres is investigated. Five kinds of partial band gaps in (111) direction are found to appear with the change of the sphere radius. The photonic band gaps tend to be upshifted in frequency with insertion of free electrons or with increase of the sphere radius.