How do I generate a sum, determined by cell color?

Top