# IColourSpace interface

Namespace: [Grasshopper2.UI.ColourPicker.Models](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.colourpicker.models.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public interface IColourSpace
```

Base interface for all colour models.

**Derived types:** [AbstractColourBall](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.abstractcolourball.md), [AbstractColourCube](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.abstractcolourcube.md), [IconTable](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icontable.md), [YxyGram](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxygram.md)

## Properties

- [Colour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/colour.md): Gets the colour currently selected in this model.
- [Filter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/filter.md): Gets or sets the source for allowed colours. When not null, this property will limit displayed colours to the defined set of colours in the filter. Assigning a new filter will automatically wipe the display caches. Note that not all models necessarily constrain themselves to a filter, this property is a hint as much as anything.
- [Format](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/format.md): Format the current model state.
- [Icon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/icon.md): Gets the icon associated with this model.
- [Nomen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/nomen.md): Gets the description of this model.

## Methods

- [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/draw.md): Draw this colour model into a graphics context.
- [GetChannels](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/getchannels.md): Gets the channel values of the current space. The current design of this api does not allow for a varying number of channels. This is potentially a big problem, potentially not. At present the only colour model which requires more than three channels is CMYK.
- [RespondToMouseDown](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/respondtomousedown.md): Respond to a mouse down event on this model.
- [RespondToMouseMove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/respondtomousemove.md): Respond to a mouse move event. These are only relayed when at least one mouse button is down.
- [RespondToMouseUp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/respondtomouseup.md): Respond to a mouse up event.
- [SetChannels](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/setchannels.md): Update the colour from channels.
- [SetColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.icolourspace/setcolour.md): Change this colour model to reflect a given colour. There is no guarantee that the model colour will be exactly equal to the given colour, there may be both rounding errors as well as gamut constraints.
