Color-tunable room temperature phosphorescent (RTP) materials have raised wide interest due to their potential application in the fields of encryption and anti-counterfeiting. Herein, a series of CdX2-organic hybrid perovskitoids, (H-apim)CdX3 and (apim)CdX2 (denoted as CdX-apim1 and CdX-apim2, apim = 1-(3-aminopropyl)imidazole, X = Cl, Br), were synthesized using apim with both rigid and flexible groups as ligands, which exhibit naked-eye detectable RTP with different durations and colors (from cyan to red) by virtue of different halogen atoms, coordination modes and the coplanar configuration of flexible groups. Interestingly, CdCl-apim1 and CdX-apim2 both exhibit excitation wavelength-dependent RTP properties, which can be attributed to the multiple excitation of imidazole/apim, the diverse interactions with halogen atoms, and aggregated state of imidazoles. Structural analysis and theoretical calculations confirm that the aminopropyl groups in CdCl-apim1 do not participate in luminescence, while those in CdCl-apim2 are involved in luminescence including both metal/halogen to ligand charge transfer and twisted intramolecular charge transfer. Furthermore, we demonstrate that these perovskitoids can be applied in multi-step anti-counterfeiting, information encryption and smart ink fields. This work not only develops a new type of perovskitoid with full-color persistent luminescence, but also provides new insight into the effect of flexible ligands and halogen engineering on the wide-range modulation of RTP properties.