Coloring states based on their total incoming or outgoing contributions