The color change of photonic crystals (PCs) has been widely studied due to their beauty and anti-counterfeiting applications. Herein, we demonstrated security codes based on chiral PCs that cannot be easily mimicked and are quite different from the conventional technology used currently. The chiral PCs can be made by self-assembly and the structural colors change based on the polarization of the light in the transmission mode. These color changes are easily detected in real-time and are useful in the fabrication of anti-counterfeiting patterns that show beautiful and diverse color changes with rotating polarizers. We believe this can provide a new platform in various security and color-based applications.