Table of Contents

Class ColorPicker

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

Color Picker supporting RGB, HSL, and HSV color models. Supports choosing colors with sliders and color names from the IColorNameResolver.

public class ColorPicker : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IDesignable
Inheritance
ColorPicker
Implements
Inherited Members

Constructors

ColorPicker()

Creates a new instance of ColorPicker. Use Style to change color model. Use SelectedColor to change initial Color.

Properties

SelectedColor

The color selected in the picker

Style

Style settings for the color picker. After making changes ensure you call ApplyStyleChanges().

Methods

ApplyStyleChanges()

Rebuild the user interface to reflect the new state of Style.

Dispose(bool)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EnableForDesign()

Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.

OnDrawingContent()

Called when the View's content is to be drawn. The default implementation does nothing.

Prompt(string, Attribute?, out Attribute)

Open a Dialog with two ColorPicker or ColorPicker16, based on the Force16Colors is false or true, respectively, for Foreground and Background colors.

Events

ColorChanged

Fired when color is changed.