Optic disc localization offers an important clue in detecting other retinal components such as the macula, fovea, and retinal vessels. With the correct detection of this area, sudden vision loss caused by diseases such as age-related macular degeneration and diabetic retinopathy can be prevented. Therefore, there is an increase in computer-aided diagnosis systems in this field. In this paper, an automated method for detecting optic disc localization is proposed. In the proposed method, the fundus images are moved from RGB color space to a new color space by using an artificial bee colony algorithm. In the new color space, the localization of the optical disc is clearer than in the RGB color space. In this method, a matrix called the feature matrix is created. This matrix is obtained from the color pixel values of the image patches containing the optical disc and the image patches not containing the optical disc. Then, the conversion matrix is created. The initial values of this matrix are randomly determined. These two matrices are processed in the artificial bee colony algorithm. Ultimately, the conversion matrix becomes optimal and is applied over the original fundus images. Thus, the images are moved to the new color space. Thresholding is applied to these images, and the optic disc localization is obtained. The success rate of the proposed method has been tested on three general datasets. The accuracy success rate for the DRIVE, DRIONS, and MESSIDOR datasets, respectively, is 100%, 96.37%, and 94.42% for the proposed method.