Can lighter carpets survive in your home?

I'm asking because we are on the hunt for a new living room rug, but after our last one we realized we need something darker that doesn't show too much. It wasn't even super light, but did have some white parts and now those parts look really gross.

If a lighter rug/carpet can survive in your home, what's your trick to keeping it clean?