Mix Colours

Name: Calculate Colour
Author: Stephane Vellay
Version: 1.0
Created: 6/2009

Purpose: Mix Colours (Additive or Subtractive)

Input Colour Property Name 1 and 2 specify the names of the colour properties to which the Mixing is applied. The result of the mix is assigned to the property named by Mixed Colour Property Name.

Input Colour Properties must contain Hexadecimal colour code. Ex: '#FFBB00' or Property name containing this string

Colour Mixing Type

There are two types of color mixing: Additive and Subtractive. In both cases there are three primary colors, three secondary colors (colors made from 2 of the three primary colors in equal amounts), and one tertiary color made from all three primary colors.


Additive Mixing

Additive mixing of colors generally involves mixing colors of light. In additive mixing of colors there are three primary colors: red, green, and blue. In the absence of color or, when no colors are showing, the result is black. If all three primary colors are showing, the result is white. When red and green combine, the result is yellow. When red and blue combine, the result is magenta. Additive mixing is used in television and computer monitors to produce a wide range of colors using only three primary colors.

The input colours should be quite dark (like Red, Lime or Blue), as the mix results in a brighter colour. A Black background is recommended in chart components for the additive mix of colours.


Subtractive Mixing

Subtractive mixing is done by selectively removing certain colors, for instance with optical filters. The three primary colors in subtractive mixing are yellow, magenta, and cyan. In subtractive mixing of color, the absence of color is white and the presence of all three primary colors is black. In subtractive mixing of colors, the secondary colors are the same as the primary colors from additive mixing, and vice versa. Subtractive mixing is used to create a variety of colors when printing on paper by combining a small number of ink colors, and also when painting. The mixing of pigments does not produce perfect subtractive color mixing because some light from the subtracted color is still being reflected. This results in a darker and desaturated color compared to the color that would be achieved with ideal filters.

The input colours should be quite bright (like Cyan, Magenta or Yellow), as the mix results in a darker colour. A White background is recommended in chart components for the subtractive mix of colours.

Wikipedia Page on Colour Mixing.

Requirements: PP Generic Reporting collection to use it in the example protocols,
Useful: Calculate Colour or Calculate Gradient Colour component to give some input to it.


Limitations: Not known
Keyword: reporting colour color gradient rainbow hue saturation value lightness red green blue RGB

Contents:
Component

  • Mix Colours.xml


Example Protocols

  • Mix Colours in Charts.xml
  • Transparent Rainbow.xml