  Tungsten trioxide (WO$_3$) is a paradigmatic electrochromic material, whose
peculiar optical properties in the presence of oxygen vacancies or intercalated
alkali atoms have been observed and investigated for a long time. In this paper
we propose a rationalization of experiments based on first-principles
calculations of optical and electrical properties of oxygen deficient (reduced)
WO$_3$. Our approach is based on a parameter-free dielectric-dependent hybrid
density functional methodology, used in combination with the charge transition
levels formalism, for studying excitation mechanisms in the presence of
defects. Our results indicate that oxygen vacancies lead to a different physics
in $\gamma$-monoclinic WO$_3$, depending on the orientation of the W-O-W chain
where the vacancy is created, thus evidencing strong anisotropic effects rooted
in the peculiar structural properties of the original nondefective monoclinic
cell. Different types of oxygen vacancies can hence be classified on the basis
of the calculated ground state properties, electronic structure, and
excitation/emission energies, giving a satisfactory explanation to a range of
experimental observations made on oxygen deficient WO$_3$.
