The disclosure relates to a method and apparatus for providing switching
optical filter. The switching optical filter provides several
functionalities at the same time. For example, the filter can be used to
remove photons of undesirable wavelength, such as ultraviolet or
infrared, while simultaneously switching from and between one mode to
another in order to accommodate changing ambient light conditions. In one
embodiment, the disclosure relates to a method for forming an optical
filter, the method comprising: forming a first electrode layer on a
substrate; forming an ion conductor layer to at least partially cover the
first electrode layer; forming an optically transparent layer over the
ion conductor layer, the optically transparent layer preventing
transmission of photons having a first wavelength while transmitting
photons of a second wavelength; and forming a second electrode layer to
at least partially cover the optically transparent layer.