Led matrix brightness problem

The ULN's outputs are either driven low (so they will sink current) or they are off/high impedance (will neither source or sink current). They can never output 5V or source current. To prevent leds lighting, turn the output off.

So the ULN's outputs have two states: low/sink and high impedance. The 595's outputs have 2 states: low/sink and high/source. The Arduino's outputs have 3 states: high, low and input/high impedance.

Actually, the 595's outputs can also be high impedance, by using the OE pin. But not individually by pin.