A spectral image can be regarded as a three-dimensional cube where each pixel is a vector of intensities representing a spectral signature. Compressive spectral imaging (CSI) is a sensing and reconstruction framework, based on the fundamentals of the compressive sensing theory, which focuses on capturing spectral images efficiently, exploiting their highly correlated information by coding its spectral characteristics commonly using a black-and-white, grayscale or recently a color coded aperture. The distribution of the entries of the coded apertures determines the quality of the estimated spectral images. State of the art methods have used random coded apertures, and some optimization procedures have focused on the optimal design of horizontal sections of the coded apertures; however, they do not fully exploit the spatio-spectral correlations within the spectral images. To that end, in this paper, it is proposed a high-dimensional optimization procedure to design color coded apertures for CSI systems, which exploits not only the spectral correlations but also the spatial correlations within an spectral image. Simulations analyzing the conditioning of the sensing matrices, as well as the reconstruction quality of the attained spectral images show the improvement entailed by the proposed method.Index Terms-Compressive spectral imaging, coded aperture design, color filter array, numerical optimization.