reckfellENGINE

ColorPickerButton

Color button with a lazily created built-in picker and separate editing signals.

On this page
class ColorPickerButtonReckfellSharpInherits Button

Set Color and connect ColorChanged to apply user edits to your model. Programmatic Color assignment updates the button and an existing picker, but emits no ColorChanged. If one action must work from both UI and code, put the model update in a shared method and call it explicitly.

GetPicker and GetPopup create internal objects on first access without opening the window. PickerCreated fires once after applying the current Color, EditAlpha and EditIntensity. Subscribe before the first getter if you want to configure the picker at creation time. Calling GetPicker from that handler is safe.

The returned ColorPicker and PopupPanel belong to the button: the popup is its internal child, and the picker is the popup’s child. Do not free or reparent them separately; freeing the button frees both. Create your own ColorPicker for a separate window with an independent lifetime.

Change the value through the button. Assigning GetPicker().Color directly does not update the button’s Color or emit its ColorChanged. Reassigning the same button Color also does not resynchronize a manually changed picker: the setter skips equal values. Configure picker appearance through GetPicker, and change the value through the button’s Color.

EditAlpha and EditIntensity control the corresponding editing UI rather than clearing data. Disabling alpha does not make the color opaque; disabling intensity does not clamp stored RGB to 0…1. An HDR value does not enable scene glow or tonemapping: these are separate rendering settings.

PopupClosed reports closure without an OK/cancel result. Do not treat it as confirmation that a color was applied. For cancellable editing, retain the original value in your model and define explicit apply/rollback rules. ColorChanged can also arrive when cancellation restores a value; it reports the value rather than only a new selection.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

ColorPickerButtonConstructor
# ColorPickerButton
C#
public ColorPickerButton();

Creates a black button (alpha = 1), with EditAlpha/EditIntensity = true and ToggleMode enabled. Built-in popup and picker are not created yet.

Properties3

ColorProperty
# Color
C#
public Color Color { get; set; }

Current color, including alpha and RGB values above 1. Assignment synchronizes an existing picker without ColorChanged. Equal values are skipped.

EditAlphaProperty
# EditAlpha
C#
public bool EditAlpha { get; set; }

Show alpha editing, default true. false retains the current alpha rather than forcing opacity. Propagates to existing and future pickers.

EditIntensityProperty
# EditIntensity
C#
public bool EditIntensity { get; set; }

Show intensity editing, default true. false neither clamps stored HDR components nor disables scene effects. Propagates to the built-in picker.

Methods8

GetPickColorColor
# GetPickColor
C#
public Color GetPickColor();

Current color, including alpha and RGB values above 1. Assignment synchronizes an existing picker without ColorChanged. Equal values are skipped.

Returns Color

Current color, including alpha and RGB values above 1. Assignment synchronizes an existing picker without ColorChanged. Equal values are skipped.

GetPickerColorPicker
# GetPicker
C#
public ColorPicker GetPicker();

Returns the button-owned ColorPicker, creating it on first access. Does not open the window. Do not free or reparent the result; change the value through the button’s Color.

Returns ColorPicker

Returns the button-owned ColorPicker, creating it on first access. Does not open the window. Do not free or reparent the result; change the value through the button’s Color.

GetPopupPopupPanel
# GetPopup
C#
public PopupPanel GetPopup();

Returns the button-owned PopupPanel; first access also creates the picker. Does not open the window. Do not free or reparent the result separately.

Returns PopupPanel

Returns the button-owned PopupPanel; first access also creates the picker. Does not open the window. Do not free or reparent the result separately.

IsEditingAlphabool
# IsEditingAlpha
C#
public bool IsEditingAlpha();

Show alpha editing, default true. false retains the current alpha rather than forcing opacity. Propagates to existing and future pickers.

Returns bool

Show alpha editing, default true. false retains the current alpha rather than forcing opacity. Propagates to existing and future pickers.

IsEditingIntensitybool
# IsEditingIntensity
C#
public bool IsEditingIntensity();

Show intensity editing, default true. false neither clamps stored HDR components nor disables scene effects. Propagates to the built-in picker.

Returns bool

Show intensity editing, default true. false neither clamps stored HDR components nor disables scene effects. Propagates to the built-in picker.

SetEditAlphavoid
# SetEditAlpha
C#
public void SetEditAlpha(bool show);

Show alpha editing, default true. false retains the current alpha rather than forcing opacity. Propagates to existing and future pickers.

Parameters
NameTypeDefault
showbool—
show

Show the corresponding editing UI without changing stored color components.

SetEditIntensityvoid
# SetEditIntensity
C#
public void SetEditIntensity(bool show);

Show intensity editing, default true. false neither clamps stored HDR components nor disables scene effects. Propagates to the built-in picker.

Parameters
NameTypeDefault
showbool—
show

Show the corresponding editing UI without changing stored color components.

SetPickColorvoid
# SetPickColor
C#
public void SetPickColor(Color color);

Current color, including alpha and RGB values above 1. Assignment synchronizes an existing picker without ColorChanged. Equal values are skipped.

Parameters
NameTypeDefault
colorColor—
color

New Color value with alpha; RGB may exceed 1.

Signals and events3

ColorChangedEvent
# ColorChanged
C#
public event ColorPickerButton.ColorChangedEventHandler ColorChanged;

Value change from the built-in picker, including restoration on cancellation. The button’s Color is updated before the handler runs. The programmatic Color setter does not itself emit this signal.

Handler parameters
NameTypeDefault
colorColor—
color

New Color value with alpha; RGB may exceed 1.

PickerCreatedEvent
# PickerCreated
C#
public event Action PickerCreated;

One-time creation of the internal popup and picker after applying initial settings. Can occur through GetPicker/GetPopup before the window opens; subscribe beforehand.

PopupClosedEvent
# PopupClosed
C#
public event Action PopupClosed;

The built-in window closed; no result argument is supplied. Does not confirm a color or replace ColorChanged, and is not emitted by hiding an already hidden window.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
bg
Texture2D

The background of the color preview rect on the button.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.