Content based image retrieval (CBIR) is ranked among the most important domain of image processing. This technique allows us to find the relevant images from a query image in a very large image database. This approach is based on the visual features of the image. Therefore, the choice of these features is a very decisive factor for improving the robustness and efficiency of the CBIR system. This paper aims at the development of a novel technique which is based on the color string coding method implemented in the previous work. This new technique combines the two color spaces: RGB and HSV, and introduces the texture features to improve the results obtained previously by increasing the number of relevant images and decreasing the computational complexity and the response time whatever the size of the images. Accordingly, the image retrieval is performed using the meta-heuristic algorithms. Meanwhile, our system is evaluated based on the precision and recall measures. The obtained results show the efficiency and the performance of the proposed method compared to other CBIR systems.