Why is my code running so slow?
Do the math how many cycles this uses:

255 * 9 * ca 100 cycles per iteration / 1 MHz = ca 0.25s

where the 100 is a very rough ballpark estimate, it could easily be more depending on the implementation of delay_us.

I'd increase the clock frequency and use an interrupt-driven approach.

But it's still going to be hard to do do proper dimming when you also do multiplexing, you'll be limited to a few colors to avoid too much flickering.