Novel supramolecular gelators based on quinoline-indolin-2-one structure were synthesized. These gelators formed stable organogels in a mixture of DMSO/H2O (1:1). The scanning electron microscopy (SEM), IR and NMR spectroscopies, and rheological measurements were used to study the properties of the gels. Among the synthesized compounds, G2 was chosen as the best gelator and utilized as a naked eye chemosensor for the selective detection of Cu2+ and Hg2+ ions alongside and CN- ion as toxic and hazardous materials. The gelator G2 was selectively transformed into a sol state in the presence of Cu2+ ion alongside with a vivid change of color from orange to cherry red. Hg2+ ion showed a notable change in color from orange to brick red, but the gel state remained intact. The detection limit for the gelator G2 toward Cu(2+)and Hg2+ were 7.25 x 10(-6) mol. L-1 and 4.80 x 10(-6) mol. L-1 respectively. All the tested anions had no distinct effect on the gel state and/or the color of G2, while, in the presence of CN-, although the gel state was again unchanged a drastic color change from orange to dark purple was observed. The detection limit for G2 toward CN- was 1.36 x 10(-4) mol. L-1. The gelator G2 also operated simultaneously the roles of INH and OR gates in which water, Hg2+, Cu2+ ions are inputs, and the gel state and absorbance around 600 nm (color change) are outputs.