Skip to content

ColorPickerPopup Class

A window that allows a user to select a color in various ways.

C#
public class ColorPickerPopup : Window, IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, IPositionable, IComponentHost, ISurface, ISurfaceSettable, ICellSurfaceResize, IWindowData

Inheritance objectScreenObjectScreenSurfaceConsoleWindow

Implements IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, SadRogue.Primitives.IPositionable, IComponentHost, ISurface, ISurfaceSettable, ICellSurfaceResize, IWindowData

Creates a new instance of the window.

C#
public ColorPickerPopup()

The color selected.

C#
public Color SelectedColor { get; set; }

An array of colors previously selected.

C#
public Color[] PreviousColors { get; }

Draws the border lines around the controls.

C#
protected override void DrawBorder()

Adds a color to the array of previous colors.

C#
public void AddPreviousColor(Color color)

color SadRogue.Primitives.Color

Displays this window.

C#
public override void Show(bool modal)

modal bool
When true, the window will be displayed as modal; otherwise false.