You didn't mention a programming language.
If this is an assignment then you are supposed to write the program yourself -- not find it.
You left out other details. Are you saying you want 1 + 4 + 15 + 10 (the pink sum), and the green sum and the purple sum?
If you were searching for the code, that implies that you have made NO attempt to write it. You should make the attempt and then, if you have problems, show us your code and explain what the trouble is.
Hint: Write out the indexes of the pink items.
Edit: When you say you tried, you should show what you tried. Hopefully, it is obvious that you need to start with a loop.
If the assignment was just to display the first number of each color (1, 3, 70, 5), could you do that?
And then, for each of those, you need a nested loop to go through all the elements of the same color.