Output waveform of TCS3200
Imagine that you have two counters. One of them just counts the FPGA clock cycles, so you know how long (in seconds) it will take for that counter to overflow.
The second counter counts pulses of your sensor input. When the first counter overflows, save the value of the second counter. This value is the frequency of the sensor input. At the same time, clear the second counter and start over.
In other words, measure the frequency of the input signal directly, don't try to measure the width of one cycle and calculate the frequency.