Calculating the value of the current-limiting resistor:
Different colors of LEDs have different forward voltage drops:
Below: Breadboard Power supply supplies 3.3V or 5V to the breadboard power bus.