This study is devoted to the development of photonic patterns based on polystyrene spheres (PSS) incorporated in chitosan hydrogels by inkjet printing. Using this method, high-resolution encrypted images that became visible only in high humidity were obtained. Inks based on PSS with carboxylic groups on the surface were made, and their rheological parameters (viscosity, surface tension, and ζ-potential) were optimized according to the Ohnesorge theory. The obtained value of the ζ-potential indicated the stability of the synthesized colloidal inks. The dependences of the printing parameters on the concentration of ethylene glycol in PSS dispersion, the drop spacing, the shape of the printed pattern, waveform, the temperature of the printing process, and the degree of ordering of the PSS-based photonic crystal were investigated. The scanning electronic microscope (SEM) images confirmed that the optimal self-organization of PSS was achieved at the following values of 0.4% weight fraction (wt%) carboxylic groups, the drop spacing of 50 μm, and the temperature of the printing table of 25 °C. High-resolution microstructures were obtained by drop-on-demand printing with a deposited drophead diameter of 21 μm and an accuracy of ±2 μm on silicon and glass substrates. The deposition of chitosan-based hydrogels on the obtained polystyrene photonic crystals allowed reversibly changing the order of the diffraction lattice of the photonic crystal during the swelling of the hydrogel matrix, which led to a quick optical response in the daylight. The kinetics of the appearance of the optical response of the obtained coating were discussed. The simplicity of production, the speed of image appearance, and the ability to create high-resolution patterns determine the potential applications of the proposed systems as humidity sensors or anticounterfeiting coatings.