I am trying to understand how the common anode matrix works
here is what my setup looks like in LT spice and I will be trying to simulate it and get results such as power, current, and voltage.

so the common anodes are connected to a DC voltage, in this case I used +5 volts
and the RGB pins have to have PWM on it so that it knows when to turn on/off according to the duty cycle
can someone help me clarify on that, thanks alot of reading this.
What I think:
If one row is of LEDS is turned on, so 8 LEDS = 8X3 = 24 LEDS * 20mA = 480 mA needed to supply for 1 row? since 20 mA is usually for max brightness.
Do I use P=V*I to calculate power so 5 Vdc * I = power? what about the Voltage in the PWM?