The circuit above has a 5 Volt supply.There are 2 Volts across the LED. The remaining 3 Volts are across the resistor. Using Ohm's law ...
R = V / I
R = 3 / 10mA
R = 3 / 0.01
R = 300R
Allowing a small safety margin, 330R was chosen allowing just under 10mA to flow.
Power = V I
Power = 3 x 10mA
Power = 3 x 0.01
Power = 0.03 Watts (30mW)
This is a very low power so any small resistor would be suitable.
The graph below shows the approximate characteristics of an LED. The reverse leakage current has been exagerated to make it show on the graph. The reverse breakdown voltage is quite low (5 volts approx).

This uses Gallium arsenide instead of Silicon as the semiconductor material.

Circuit and Layout for an LED Power Indicator ...
Colour |
Approximate Voltage Drop |
Photon Energy |
Photon Wavelength |
Infrared |
1.6 V |
Lowest |
Longest |
Red |
1.8 V to 2.1 V |
Higher |
Shorter |
Orange |
2.2 V |
|
|
Yellow |
2.4 V |
|
|
Green |
2.6 V |
|
|
Blue |
3.0 V to 3.5 V |
|
|
White |
3.0 V to 3.5 V |
Lower |
Longer |
Ultraviolet |
3.5 V |
Highest |
Shortest |
