The transition from text to images as the primary form of information transmission has recently increased the need for secure and effective encryption techniques due to the expanding information dimensions. The color picture encryption algorithm utilizing chaotic mapping is limited by a small chaotic range, unstable chaotic state, and lengthy encryption duration. This study integrates the Ackley function and the Styblinski–Tang function into a novel two-dimensional hyperchaotic map for optimization testing. A randomness test is run on the chaotic sequence created by the system to check that the new chaotic system can better sustain the chaotic state. This study introduces two techniques, genetic recombination and clock diffusion, to simultaneously disperse and mix images at the bit level. This study utilizes chaotic sequences in genetic recombination and clock drift to propose an image encryption technique. The data indicates that the method demonstrates high encryption efficiency. At the same time, the key also successfully passed the NIST randomness test, verifying its sensitivity and randomness. The algorithm’s dependability has been demonstrated and can be utilized for color image encryption.