Add a function for generating a visually distinct color from a given color
Add a function for determining the id of the top composited buffer
Add a function to copy PictureEvents