The best colour scheme to hide dirt is dark brown. Darker shades of green and blue can also successfully conceal dirt, but pinks, light greens, and light brown carpets will conceal dirt more effectively.
However, these aren’t common carpet colours. If you would prefer a bright colour carpet, use colourful patterns to camouflage the dirt.