Infrared gas imaging enables visual monitoring of target gases by identifying their characteristic absorption lines within the 3-12 μm spectral "fingerprint" region. However, conventional imaging systems that rely on filtering or dispersive elements typically suffer from bulky volume, low light collection efficiency, and an inability to perform snapshot spectral imaging. Metasurface-based color routing technology, by precisely manipulating the dispersion and phase distribution of light at subwavelength scales, can achieve near-lossless spectral separation across different wavelength bands and direct them to designated regions, thereby providing a key technological breakthrough for integrated and miniaturized infrared spectral imaging systems. In this study, we propose a color router based on chalcogenide glass metasurface, and optimize its routing performance by using an inverse design based on a genetic algorithm and a forward design grounded in phase-delay principles. The color router is capable of directing multiple wavelengths in the mid-wave infrared (MWIR, 3-5 μm) and long-wave infrared (LWIR, 8-12 μm) bands to distinct pixel regions. In the inverse design, diagonal-symmetric binary topologies are co-optimized using a genetic algorithm and finite-difference time-domain simulations to route the selected wavelengths into Bayer-type pixel regions. In the forward design, C4-symmetric square meta-atoms are selected from multiwavelength phase libraries to match the required propagation-phase profiles and form dedicated focal spots in separate pixel quadrants. The inverse-designed color router produce maximum target-channel responses of 18.4%, 16.1%, and 19.2% in MWIR and 20.5%, 22.6%, and 21.4% in LWIR, with band-averaged full-plane transmissions of 48.5% and 43.4%, respectively. Phase-matched forward-designed color router increase the maximum target-channel responses to 33.5%, 39.5%, and 37.0% in MWIR and 35.0%, 36.2%, and approximately 32% in LWIR, while maintaining total routing-energy utilization reach to 80.6% and 76.2%, accompanied by reduced interchannel crosstalk and more compact focal spots. These simulations establish a dual-band material and design framework that combines topology optimization with phase engineering for efficient, simultaneous spectral routing. This work successfully extends color routing technology to the MWIR and LWIR ranges, providing a feasible pathway for developing next-generation infrared imaging systems, and holds promise for future application in smart, real-time simultaneous infrared gas imaging and detection systems.