This can be done with 2 OpAmps a few resistor a capacitor (and a switching transistor for bigger powers)
The first OpAmp is a sawtooth generator and the second is just a comparator with an adjustable trigger level. This can be done with a potentiometer or what ever you want to use for variable voltage control.
I have an eagle schematic here somewhere for a RGB-controller that works that way, if you want it, I can upload it...