A resistor is the most basic way to limit the current going through a LED. If you don't limit the current, the led will be damaged.
To turn on or off a basic LED in the most basic way, you put a resistor in series with the LED. The resistor's value will have to be chosen in such a way as to limit the current going through the led.
The value of the resistor will depend on the input voltage, the forward voltage of the led and the number of leds in series with the resistor.
So for example, if you have a 5v power supply and you want to power a RED led that has a forward voltage of approximately 1.7v and you want 20mA (0.02A) going through the LED, then you calculate the value like this :
Input voltage - [number of leds x forward voltage of led] = Resistor Value x Current
So : Resistor Value = (Input voltage - [number of leds x forward voltage of led] ) / Current = (5v - 1 led x 1.7v ) / 0.02 = 165 ohm.
This is not a standard value, you want as much as possible to stick to E series - https://en.wikipedia.org/wiki/E_series_of_preferred_numbers#Lists
- prefferably up to E24, so you'd choose either
1. 160 ohm (1.6 x 100 in E24 series) which will result in a bit more than 20mA going through LED, or
2. 180 ohm (1.8 x 100 in E24 series) which will result in a bit less than 20mA going through LED
RED leds have a lower forward voltage, typically around 1.7..2v depending on chemistry used to make the led.
Yellow and green leds can have a forward voltage of around 2v..2.2v
White and blue leds have a forward voltage of around 3..3.2v
So for example, if you have 12v from computer, you can put 3 white or blue leds in series and use a single resistor to limit current going through the 3 leds with just one resistor.
let's say 3.2v forward voltage , 20mA (0.02A) so reuse the formula:
Resistor Value = (Input voltage - [number of leds x forward voltage of led] ) / Current = [12v - (3 leds x 3.2v forward voltage) ] / 0.02 = 2.4/0.02 = 120 ohm
which happens to be E12 value so super easy to find.
This is super simple way to limit current through a resistor, but it's quite inefficient... you'll waste a lot of energy as heat in the resistors.
you can estimate the power wasted using the formula :
Power = Current2 x R
So for the red led example above which consumes 1.7 x 0.02 = 0.034 watts, you'll waste P = 0.022 x 160 ohm = 0.064 watts in the resistor (0.064w means you can use a 0.125w rated resistor or a 0.1w surface mounted resistor.)
Your circuit is only ~35% efficient, 2 thirds of your power supply power is heat in the current limiting resistor.
For the 3 leds in series example, the resistor will waste P = 0.022 x 120 = 0.048 watts, but your leds consume 3 leds x 3.2v x 0.02 = 0.192 watts so your circuit is 80% efficient, only 20% of your power supply is wasted as heat.
In the case of the red led example, if you have a lot of red leds, it would makes sense to optimize the circuit by converting the voltage to a value as low as possible ... for example, I'd use a dc-dc converter to convert 5v down to around 2v and recalculate the resistor value.
There are LED driver ICs with multiple channels, where each channel can have a number of leds in series, and all the channels are limited to a maximum current value using a single resistor, and then you can send commands to the led driver chip to further limit the current on a particular channel to a percentage of that maximum limit. This way, you only need to use a single resistor to configure the maximum current limit for safety) and save money on resistors and space on circuit boards.
For what you plan, it makes most sense for you to make tiles of leds of some predefined size like 32x9 or 16x16 or 24x16 or whatever, and have one or two dc-dc converters convert 12v...24v down to let's say 2.5v for red and green , and 3.3v for blue, to reduce amount of heat and waste.
you want higher voltage, because high current means losses in wires... so you want higher voltage ./ low current
Even a small tile of 16x16 RGB leds can consume 256 leds x 3 colors per led x 20mA per color = 15360 mA or 15A at maximum brightness. So it's one thing to power it with 5v 15A power supply and waste around two thirds as heat if you limit each led with a resistor, and another thing if you use dc-dc converters to get as close as possible:
2 colors x 2.5v x 256 leds x 0.02A + 1 color x 3.3v x 256 leds x 0.02A = 25.6w + 16.9w = 42.5w ... with 24v psu, that's 45w / 24v = ~1.9A (46w because around 4w will be lost in dc-dc conversion from 24v to those low voltages, converters aren't 100% efficient)
You will probably also want to choose a resistor value for the RED leds for lower current, because human eyes are more sensitive to red, so you don't need as much current to get same brightness as the other colors and ALSO the current chemicals used for making red leds make it possible to emit a lot of light with much less current on red leds .. so both these things combine to make it possible to use less power for RED leds.
There are red leds which are bright enough for on/off/standby use with less than 0.1 mA going through them.