By deriving color and texture attributes, this paper develops a new framework for content-based image retrieval (CBIR). The individual histograms on the H, S, and V planes are calculated in the first step. This paper primarily divided the 3x3 window into four overlapped microgrids of size 2x2. On each micro grid, it has derived Rule-based Dynamic motif (RM) indexes. The RM extracts all probable Motifs on a 2x2 grid by overcoming all possible ambiguities. This process transforms the 3x3 window into a 2x2 grid and each grid value represents the shape, and texture features more efficiently and precisely. On this transformed grid of 2x2, this paper applied Stretched Texton (ST) patterns. The ST patterns consider the magnitude relationship among the pixels that are part and not part of texton formation. This aspect is not considered in the earlier methods. The co-occurrence features are derived from RM-ST matrix (RMSTCM). The feature vector is derived by fusing features of RMSTCM with the histogram features of color components of H, S, and V. The suggested framework is related with the other methods of significance. The outcomes specify the efficacy of the RMSTCM.