For a 2d sprite simulation I have a grouping of different sized planets. Their size represents their mass. The each have a randomly generated color. When they collide I would like to mix the colors based on their mass, ie a small black + a big white should be slightly gray. How can I do this in a RGB system?