Context. There are two different evolution patterns of the peak energy (E p ) exhibited during the prompt emission phase of gamma-ray bursts (GRBs), i.e., hard-to-soft and intensity-tracking, of which the physical origin remains unknown. Except for low-energy indices of GRB prompt spectra, the evolution patterns of E p may be another crucial indicator to discriminate radiation mechanisms (e.g., synchrotron or photosphere) for GRBs. Aims. We explore the parameter space to find conditions that could generate different evolution patterns of the peak energy in the framework of synchrotron radiation. Methods. We have developed a code to calculate the synchrotron emission from a simplified shell numerically, considering three cooling processes (synchrotron, synchrotron self-Compton (SSC), and adiabatic) of electrons, the effect of decaying magnetic field, the effect of the bulk acceleration of the emitting shell, and the effect of a variable source function that describes electrons accelerated in the emitting region. Results. After exploring the parameter space of the GRB synchrotron scenario, we find that the intensity-tracking pattern of E p could be achieved in two situations. One is that the cooling process of electrons is dominated by adiabatic cooling or SSC+adiabatic cooling at the same time. The other is that the emitting region is under acceleration in addition to the cooling process being dominated by SSC cooling. Otherwise, hard-to-soft patterns of E p are normally expected. Moreover, a chromatic intensity-tracking pattern of E p could be induced by the effect of a variable source function.