ColourMean

public sealed class ColourMean
A utility class for computing reasonably accurate averages of colours. This class correctly separates out the alpha and colour contributions. That is, lots of very transparent colours will affect the average alpha, but not the average tint.

Constructors

ColourMean

#
Create a colour mean based on a collection of existing colours.
public ColourMean(
mapping,
params Color[]
colours
)

ColourMean

#
Create an empty colour mean.
public ColourMean()

Properties

Average

#
Gets the average colour of the entire set so far.
public Color Average { get; }

Count

#
Gets the total number of colours that went into this average.
public int Count { get; }

Mapping

#
Gets the mapping used during averaging.
public ColourMeanMapping Mapping { get; }

Methods

AddColour

#
Add a colour to this mean.
public void AddColour(
Color
colour
)

AddColours

#
Add a collection of colours to this mean.
public void AddColours(
IEnumerable<Color>
colours
)

Clear

#
Clear all data.
public void Clear()