  Metasurface-based color display and holography have greatly advanced the
state of the art display technologies. To further enrich the metasurface
functionalities, recently a lot of research endeavors have been made to combine
these two display functions within a single device. However, so far such
metasurfaces have remained static and lack tunability once the devices are
fabricated. In this work, we demonstrate a dynamic dual-function metasurface
device at visible frequencies. It allows for switching between dynamic
holography and dynamic color display, taking advantage of the reversible phase
transition of magnesium through hydrogenation and dehydrogenation. Spatially
arranged stepwise nanocavity pixels are employed to accurately control the
amplitude and phase of light, enabling the generation of high-quality color
prints and holograms. Our work represents a paradigm toward compact and
multifunctional optical elements for future display technologies.
