# GH_ColourPickerBase class

Namespace: [Grasshopper.GUI.Base](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.gui.base.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_ColourPickerBase : IGH_ToolstripItemKeyHandler
```

Provides Colour picker GUI not tied to a control-handle.

## Constructors

- [GH_ColourPickerBase](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/ctor.md): Create a new instance of the Colour Picker base control. This constructor assigns the default Colour space model and involves a call to the Grasshopper core settings server. You must call SetupColourPicker() prior to rendering this control on screen.

## Properties

- [AutoSize](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/autosize.md): Gets or sets a value indicating whether the width and height of the Bounds are adjusted to fit the UI.
- [BackColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/backcolour.md): Gets or sets the background colour of the picker.
- [BaseColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/basecolour.md): Gets the original base colour for this picker. Use SetupColourPicker to assign this colour.
- [BaseColourBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/basecolourbox.md): Gets the rectangle containing the base colour swatch.
- [Bounds](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/bounds.md): Gets or sets the Bounds for this control.
- [ChannelBox0](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/channelbox0.md): Gets the rectangle containing the tag string for the first channel slider.
- [ChannelBox1](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/channelbox1.md): Gets the rectangle containing the tag string for the second channel slider.
- [ChannelBox2](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/channelbox2.md): Gets the rectangle containing the tag string for the third channel slider.
- [ChannelBox3](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/channelbox3.md): Gets the rectangle containing the tag string for the fourth channel slider.
- [ColourCubeBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/colourcubebox.md): Gets the rectangle that contains the colour space cube.
- [ColourSpace](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/colourspace.md): Gets the Colour space mode used in this picker.
- [Cube](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/cube.md): Gets the graphics object that describes the current colour cube.
- [DesiredHeight](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/desiredheight.md): Gets the ideal height for this colour picker given it's width and UI settings.
- [DrawAlphaSlider](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/drawalphaslider.md): Gets or sets whether or not the alpha slider is included in the UI.
- [DrawBackground](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/drawbackground.md): Gets or sets whether the background of the picker is drawn.
- [DrawChannelSliders](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/drawchannelsliders.md): Gets or sets whether or not the three basic channel sliders are included in the UI.
- [DropperPreviewBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/dropperpreviewbox.md): Gets the rectangle in which the eye-dropped preview will be drawn.
- [Font](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/font.md): Gets or sets the Font used in this Colour Picker. Do not Dispose the Font returned by this property.
- [HSVSpaceBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/hsvspacebox.md): Gets the rectangle containing the base colour space.
- [IsTextInput](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/istextinput.md): Gets whether any of the slider is currently displaying a text input box.
- [Padding](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/padding.md): Gets or sets the Padding for this control.
- [PickColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/pickcolour.md): Gets the picked colour.
- [PickColourBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/pickcolourbox.md): Gets the rectangle containing the pick colour swatch.
- [RGBSpaceBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/rgbspacebox.md): Gets the rectangle containing the pick colour space.
- [SRCSpaceBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/srcspacebox.md): Gets the rectangle containing the eye-dropper function.

## Methods

- [Invalidate](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/invalidate.md): Raise the Invalidated event.
- [MouseClick](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/mouseclick.md): Respond to mouse-click events.
- [MouseDoubleClick](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/mousedoubleclick.md): Respond to mouse-doubleclick events.
- [MouseDown](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/mousedown.md): Respond to mouse-down events.
- [MouseMove](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/mousemove.md): Respond to mouse-move events.
- [MouseUp](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/mouseup.md): Respond to mouse-up events.
- [OnColorChanged](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/oncolorchanged.md): Raise the ColorChanged event.
- [Render](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/render.md): Render this slider into a Graphics context.
- [RespondToEnter](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/respondtoenter.md)
- [RespondToEscape](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/respondtoescape.md)
- [SetUiScaling](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/setuiscaling.md)
- [SetupColourPicker](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/setupcolourpicker.md): (2 overloads) Setup all UI elements.

## Events

- [ColorChanged](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/colorchanged.md): Raised whenever the color of this picker is changed due to User-Interface methods.
- [Invalidated](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.base.gh-colourpickerbase/invalidated.md): Raised whenever a redraw is required.
