# NamedColourCollision class

Namespace: [Grasshopper2.Types.Colour](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.types.colour.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class NamedColourCollision
```

Describes the collision of two or more named colours. Named colours collide when they have the same name.

## Constructors

- [NamedColourCollision](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.colour.namedcolourcollision/ctor.md): Create an empty collision.

## Properties

- [Colours](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.colour.namedcolourcollision/colours.md): Enumerate over all colours.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.colour.namedcolourcollision/count.md): Gets the number of colours involved in this collision.

## Methods

- [AddColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.colour.namedcolourcollision/addcolour.md): Add a colour to this collision.
- [Colour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.colour.namedcolourcollision/colour.md): Gets the colliding colour at the given index.
- [Palette](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.colour.namedcolourcollision/palette.md): Gets the palette which owns the colliding colour at the given index. This field may be null as colours do not necessarily belong to a palette.
