Compared with conventional semiconductors, halide perovskite nanocrystals (NCs) have a unique crystal structure and outstanding optoelectronic properties, which offer a wide potential for applications in optoelectronic devices such as solar cells, photodetectors, light emitting diodes, lasers and displays. Rational technological design is providing vital support for the development of perovskite optoelectronics. Herein, high-quality and monodisperse all-inorganic halide perovskite nanocrystals with consistent morphology, concentrated size distribution and cubic crystal phase were synthesized employing a modified one-pot hot injection method to independently modulate the stoichiometric ratios of three precursors involving cesium salt, lead source and halide. Mixing two kinds of perovskite NCs with different halogens, in combination with an anion exchange reaction, enables a transition from violet emission to green and finally to red emission over the entire visible region. Our work will be applied to enhance optoelectronic properties and stability of all-inorganic perovskite NCs for serving as light-emitting components in optoelectronic devices, as well as expanding the application areas of perovskite semiconductors for photocatalytic hydrogen generation, CO2 reduction and dye degradation.