There are several ways to use fewer microcontroller pins than you have diodes. Which route you choose depends on details like required brightness, whether you want to buy or build stuff, how much you want to spend, form factor, size etc etc.
An RGB LED contains 3 independently driven diodes. I'll refer to this as '3 diodes' or 'an RGB', so we don't over or under count.
Simplest solutions first
a) One diode per pin, as in your question. This is the simplest. 5 pins will drive 5 diodes, or nearly 2 RGB LEDs. Each pin can be PWM'd to control individual diode brightness, so you can get the full available colour gamut from one of the RGB's.
b) Buy WS2811 or 2812 driven RGBs. These are usually available in a long strip. The entire strip can be driven from one or two GPIO pins (depending on whether it's a '1 or a '2) and strips can be cascaded and still need the same number of pins. The strips often have break lines with pads either side between the diodes so you can separate the RGBs, wiring across the break with some lengths of wire.
The timing required on the drive pins is a bit tricky, but most popular MCUs have driver libraries available for these ICs.
Or you could buy the WS281x ICs themselves and build with them, but it's far cheaper and easier to get the driven RGBs. WS2811 WS2812.
As jcaron comments below, APA102 is another option (9822 being a common clone of that), with more conventional SPI programming, and a much higher PWM frequency (which improves on the horrible 281x flicker (though some later 281x's have apparently higher PWM frequency)), but they appear to be much more expensive than 281x's at the moment (early 2019).
c) Multiplexing. Each diode spends some time off, so you get lower maximum brightness. Each GPIO pin drives the anode or cathode of several diodes. With 5 pins, you would typically split them into 2+3, so could drive 6 diodes, or 2 RGBs. You will typically need a current booster to drive the common lines, unless you want to suffer a further brightness hit. If you decode the device selection lines rather than using them directly, so use the group of 2 lines to select one of 4 devices, you could drive 4 RGBs.
d) Charlieplexing. Like multiplexing, but a more subtle arrangement, that dynamically reuses the undriven common pins to drive the other diodes. You can drive up to n(n-1) individual diodes, which is 20 in your 5 pin case. When the diodes are physically grouped into 3s as in RGBs, there will be a restriction due to this, but you can still drive 5 RGBs with 5 pins (and add another 5 single diodes to the matrix as well).
e) GPIO expansion. You can use ICs like HC595 to increase the effective number of output pins on an MCU, this has 8 outputs and can be cascaded indefinitely for more outputs. Most popular MCUs have libraries which simplify the driving of such expanders. HC595 has lower current output than typical MCU pins and will not light LEDs as brightly without drivers, though 6mA will still get a reasonable brightness. There are other ICs available with more pins, and higher current outputs.