A selective chromogenic probe for mercury(II) and cyanide in aqueous buffered solution from a cycloaddition reaction of an ynamine to polycyclic dithiolethiones.