We performed an optical/infrared study of the counterpart of the low-mass X-ray binary KS1731-260 to test its identification and obtain information about the donor. Optical and infrared images of the counterpart of KS1731-260 were taken in two different epochs (2001 and 2007) after the source returned to quiescence in X-rays. We compared those observations with obtained when KS 1731-260 was still active. We confirm the identification of KS1731-260 with the previously proposed counterpart and improve its position to RA=17:34:13.46 and DEC=-26:05:18.60. The H-band magnitude of this candidate showed a decline of ~1.7 mags from outburst to quiescence. In 2007 April we obtained R=22.8+-0.1 and I=20.9+-0.1 for KS1731-260. Similar optical brightness was measured in June 2001 and July 2007. The intrinsic optical color R-I is consistent with spectral types from F to G for the secondary although there is a large excess over that from the secondary at the infrared wavelengths. This may be due to emission from the cooler outer regions of the accretion disk. We cannot rule out a brown dwarf as a donor star, although it would require that the distance to the source is significantly lower than the 7 kpc reported by Muno et al. 2000.