Building an 8x8 RGB LED Matrix with Transistors, Arduino Mega 2560

Hello guys.
I want to build an 8x8 RGB LED Matrix (normal 5mm LEDs; Diffused Common Cathode) and i don’t quite get it how the circuit should look like. I was planning to use couple of BC547B Transistors, Arduino Mega 2560 and resistors.

This is 1 row out of 8, i don’t know if i connected everything as it should be, can anyone help me with that? Will all LEDs going to glow in the same color or can i program them to glow as i want? Sorry for my broken english. :sweat_smile:

So you will drive the 24 anodes from the Mega, with a current limit resistor each anode, and then sink the common cathode from each with its own transistor, with a current limit resistor between the Arduino pin and the transistor base? Then yes, you can have each LED color on or off with each row. Be sure to observe the Mega per port current limitations:

Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady
 state conditions (non-transient), the following must be observed:
 ATmega640/1280/2560:
 1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200mA.
2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.
3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200mA.
4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100mA.
5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100mA.
If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current
greater than the listed test condition.

Yeah, i forgot to add a resistor betwen arduino port and the transistor. Thank you very much for your help!