Colors in nature can be classified into two categories: colors which originate in pigments (coloring matter) and structural colors, which are caused by optical path differences at the level of microscopic structures. Structural colors change according to viewing angles and lighting conditions. This paper proposes a generic method for rendering structural colors in real time. The proposed method's use of optical path differences as common parameters enables unified treatment of various types of microscopic structures and representation by textures that store optical path differences, which can speed up rendering. The proposed method can be applied to object of arbitrary shapes and enables rendering from random viewing angles and lighting conditions in real time.