Added function to combine RGB values from object