In order to make the security and operating efficiency of an image encryption algorithm coexist, this study proposed a color image encryption algorithm with improved DNA coding and rapid diffusion. During the stage of improving DNA coding, the chaotic sequence was used to form a look-up table to complete the base substitutions. In the replacement process, several encoding methods were combined and interspersed to make the randomness higher, thereby improving the security performance of the algorithm. In the diffusion stage, three-dimensional and six-directional diffusion was performed on the three channels of the color image by taking the matrix and the vector as the diffusion unit successively. This method not only ensures the security performance of the algorithm, but also improves the operating efficiency in the diffusion stage. From the simulation experiments and performance analysis, it was shown that the algorithm has good encryption and decryption effects, large key space, high key sensitivity, and strong security. The algorithm can effectively resist differential attacks and statistical attacks, and has good robustness.