This LED resistor calculator is a useful tool to calculate the resistance value of a current limiting resistor. It can also find the color code equivalent to the calculated resistance.
Normally an LED draws 20mA current at 2-3.5 volts. If the input voltage across an LED is less than its highest voltage rating then it will glow properly. As the voltage increases, the LED will draw more current which means the probability of the LED going bad will increase. To overcome this problem, a current-limiting resistor is connected in series with the circuit.
Using this LED resistor calculator you can find the resistor value by just entering the supply voltage and color of the LED. It will also tell the color code of the calculated resistance value.