A multi-color light source is a significant tool for nonlinear optics experiments, pump–dump/repump–probe experiments and in other fields. Here, a novel method is proposed to create three-color pulses based on a high-gain harmonic-generation (HGHG) free-electron laser with a tilted electron bunch. In this method, the initial bunch tilt is created by transverse wakefields after the bunch passes through a corrugated structure with an off-axis orbit, and is further enlarged in a following drift section. Then the tilted bunch experiences the off-axis field of a quadrupole magnet to cool down the large transverse velocity induced before. After that, it enters an HGHG configuration adopting a transverse gradient undulator (TGU) as the radiator, where only three separated fractions of the tilted bunch will resonate at three adjacent harmonics of the seed wavelength and are enabled to emit three-color pulses simultaneously. In addition, the use of the natural transverse gradient of a normal planar undulator instead of the TGU radiator to emit three-color pulses is also studied in detail. Numerical simulations including the generation of the tilted bunch and the free-electron laser radiation confirm the validity and feasibility of this scheme both for the TGU radiator and the natural gradient in the extreme-ultraviolet waveband.