A resistive switching random access memory (RRAM) has occupied great scientific and industrial interest for next-generation data storage technology because of its advantages of nonvolatile behavior, low power consumption, high density, rapid writing/erasing speed, and simple operating system. In this work, the wide spectrum with self-colored ZnO layers on the Ti foil is obtained by varying the sputtering time, and the colors of these ZnO films can be tuned by a MoS 2 layer covering. Further, an existence of resistive switching (RS) memory and negative differential resistance (NDR) state in MoS 2 /ZnO heterojunction devices was demonstrated, in which the bright yellow Ag/MoS 2 /ZnO/Ti device shows the best performance with long time endurance. This work opens up an opportunity for exploration of the multifunctional components in future electronic applications.