A green-screen is a cinematographical processing technique where an objective (a person, an object, etc) is placed in front of a mono-colored background such that later in processing the green-screen background can be cut out leaving only the objective for the purpose of placing the objective into a different scene. For example this is how actors are "painted" onto scenes that do not exist in reality but are rendered using computer programs with the intent of making the audience believe that the actor is part of the scene and even interacting with the scene. Typically, the background color is green, which is why it is frequently called a green-screen, but in reality, the green color can be any color, ideally a color that is not part of or does not blend too easily with the objective. For example, if a blue and white teapot is to be filmed cut out and transplanted onto a different scene then ideally the background should not be either blue or white or else the cutting process might cut out pieces of the teapot itself.
The green-screen color problem is simplified when creating cartoons where animations are involved that are created on the computer with a "transparent" color as the background and with a fixed set of colors. Without going into too much detail, sometimes transparent videos are not accepted depending on the formats, such that a background color has to be chosen instead of just being "transparent". When overlaying the animation onto a scene, the background has to be cut out again, such that the problem of picking an optimal background color that will be cut out later still persists. One approach to picking the best background color to be cut out first involves generating a color palette from all the frames of the object being animated, then using the palette as a reference and picking the background color to be a color that does not show up on the color palette, thereby ensuring that when the background is cut out, no pieces of the objective will be cut out.
With a color-palette made out of a sequence of frames for an animated objective, the problem is reduced to choosing a color that is farthest away from the colors on the color-palette and for that task complimentary colors can be used, perhaps even for a larger number of colors other than two by summing up and averaging the values, in order to determine the perfect background color that contrasts best with the colors on the color-palette.