ColourMixture

public class ColourMixture
Utility class for creating linear combinations of colours.

Constructors

ColourMixture

#
public ColourMixture(bool linearise)
Create a new aggregator.
linearise (bool)If true, colours are linearised prior to combining. This involves additional steps, but tends to yield a more natural blending of colours.

Properties

Linearise

#
public bool Linearise { get; }
Gets whether the aggregate is computed in linear RGB or sRGB.

Result

#
public Color Result { get; }
Gets the aggregate colour. The channels in the colour may exceed the LDR limits.

Methods

Add

#
public void Add(Color rgb, float weight)
Add a colour to this set.
rgb (Color)Colour to add.
weight (float)Relative weight of colour.