A BODIPY-based 1 as a colorimetric fluorescence sensor was synthesized, and its metal sensing property was investigated. 1 displayed high selectivity and sensitivity towards Hg2+ and Cu2+ ions among 15 different metal cations. The addition of Hg2+ and Cu2+ ions into 1 in CH3CN resulted in a significant bathochromic shift of the UV absorption spectra from 533nm to 560nm and 593nm, respectively, changing the corresponding colors from pink to purple and blue. When excited at 530nm, the fluorescence intensity of 1 was quenched over 75% upon addition of Hg2+ ions, while 1 with Cu2+ ions exhibited significant fluorescence enhancement with a 23nm red-shift. Based on these results, three logic gates (OR, IMPLICATION, and INHIBIT) were obtained by controlling the chemical inputs.