Controlling color on tasted items

I am building a toaster for coconut, crutons, almonds etc that will have a tumbling type device built in. I will most likely just control the color manually by smell and eye but would prefer to incorporate some kind of control if not too elaborate. I am wondering if a smoke detector or CO2 sensor could be calibrated to achieve color control or if their are other devices that would give me a high quality, consistent result.

Sorry about that typo in the title, I have no way to edit.

Well, normal toasters operate on a simple variable resistor timing mechanism. What’s wrong with that?

I read up on them a bit and they use a bi metal heat sensor. I plan to try that but not sure how well it could work with tumbling and air movement, I guess I could install it at an exhaust point.