Metal-to-ligand and ligand-to-metal charge transfer in thin films of Prussian blue analogues investigated by X-ray absorption spectroscopy.