# ColourMean class

Namespace: [Grasshopper2.Imaging.Raycasting](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.imaging.raycasting.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
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](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.colourmean/ctor.md): (2 overloads) Create a colour mean based on a collection of existing colours.

## Properties

- [Average](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.colourmean/average.md): Gets the average colour of the entire set so far.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.colourmean/count.md): Gets the total number of colours that went into this average.
- [Mapping](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.colourmean/mapping.md): Gets the mapping used during averaging.

## Methods

- [AddColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.colourmean/addcolour.md): Add a colour to this mean.
- [AddColours](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.colourmean/addcolours.md): Add a collection of colours to this mean.
- [Clear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.colourmean/clear.md): Clear all data.
