Regulates the current of LEDs.
It auto-adapts to the Uf voltage and number of LEDs as long as the supply voltage of the OPA is great enough. Use the switches to "remove" LEDs in this example. You can even use them in RL to switch off some or all LEDs. The circuit will instantly adapt, no change in brightness of the other LEDs.
Use a TDA2030 for high current LEDs. This one can source/sink up to 2A while it still behaves like the classic uA741.
The trick is that the OPA compares the curent converted to a voltage by a shunt (0.5 Ohm) with a voltage of your choice so it sets its output voltage to match both voltages. To do that, it must provide exactly the current of YOUR choice and this one passes the LEDs.
You can make your own "direct LED" PSUs where you can plug in any LED (colour) and number without adjustments or additional resistors.
If you have a variable input voltage, stabilize the voltagr divider usinv a Zener diode.