A better way to drive the LED is with a constant current source. This circuit will provide the same current from device-to-device and over temperature shifts. It also has lower power dissipation than using a simple current limiting resistor. Commercial, off-the-shelf LED drivers are available from a number of different sources. Typically these operate using pulse width modulation (PWM) principles for brightness control.