This paper presents a novel scheme for implementation of quasi-optimal chaotic random codes (CRC). Usually, the localization grey relational grade (LGRG) approaches 1 by using less random codes to encrypt digital color images. On the contrary, randomized codes cause highly independent images. In this paper, the LGRG between original and encoded image is used as the quality characteristic, and the chaotic system's initial values x(0), y(0) and z(0) which influence the quality characteristic are chosen as control factors and the levels are also decided. According to the control factors and levels, this paper applied a Taguchi orthogonal array for the experiments, and generated a factor response graph, to figure out a set of chaotic initial values. Finally, the quasi-optimal CRC are decided by these initial values. Eventually, the most effective encryption of digital color images can be obtained by applying the quasi-optimal CRC. The experimental results have demonstrated that the proposed scheme is feasible and efficient. (C) 2007 Elsevier B.V. All rights reserved.