All you need is a photodetector. The heating coils illuminate the toast, and the photodetector shuts the toaster off once it's dark enough. The darkness knob adjusts the photodetector's cutoff threshold.
This system is even adaptive -- if it's cold that day, or your bread is frozen, it'll still get toasted to the same color.