Dynamic structural color can empower devices with additional functions like spectrum and polarization detection beyond display or imaging. However, present methods suffer from narrow tuning ranges, low throughput, or bulky volumes. In this work, a tunable filter composed of a dichroic metagrating Fabry-Perot cavity and liquid crystal (LC) material is proposed and investigated. By modulating the polarization of the incident light with the LC, the color response can change from blue to green and deep red due to the `mode jumping' effect, with a tuning range of around 300 nm. Besides, we experimentally demonstrate the use of this device as a spectral imager in the visible range. Experimental results show that spectral resolvability can be around 10 nm, with the largest peak wavelength in accuracy of ~5 nm. This approach shows superior performance over traditional liquid crystal tunable filters in low light conditions and indicates the potential of dynamic structural color for miniaturized spectroscopic applications.