A color picker component that allows users to select colors through various input methods including color palette, RGB sliders, hex input, and predefined swatches. RadzenColorPicker provides a comprehensive color selection interface with alpha channel support. Displays a button showing the current color. Clicking opens a popup with multiple color selection methods including visual picker (click on hue/saturation gradient to select colors visually), hue/alpha sliders to fine-tune hue and transparency, RGB input to enter specific Red/Green/Blue values (0-255), hex input to enter hex color codes (#RRGGBB or #RRGGBBAA), and predefined swatches for quick selection. The Value is a hex color string (e.g., "#FF0000" for red, "#FF0000AA" for semi-transparent red). Supports alpha channel (transparency) in RGBA format. Use for applications requiring color customization like themes, charts, or design tools.
FormComponent<string>.GetValue
FormComponent<string>.OnContextMenu
FormComponent<string>.GetClassList
FormComponent<string>.FocusAsync
FormComponent<string>.TabIndex
FormComponent<string>.Placeholder
FormComponent<string>.Disabled
FormComponent<string>.EditContext
FormComponent<string>.ValueChanged
FormComponent<string>.HasValue
FormComponent<string>.FieldIdentifier
FormComponent<string>.ValueExpression
FormComponent<string>.FormFieldContext
FormComponent<string>.CurrentPlaceholder
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenColorPicker : FormComponent<string>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponentBasic color picker:
<RadzenColorPicker @bind-Value=@backgroundColor />
@code {
string backgroundColor = "#FF5733";
}
Color picker with predefined swatches:
<RadzenColorPicker @bind-Value=@color Change=@OnColorChange>
<RadzenColorPickerItem Value="#FF0000" />
<RadzenColorPickerItem Value="#00FF00" />
<RadzenColorPickerItem Value="#0000FF" />
</RadzenColorPicker>A color picker component that allows users to select colors through various input methods including color palette, RGB sliders, hex input, and predefined swatches. RadzenColorPicker provides a comprehensive color selection interface with alpha channel support. Displays a button showing the current color. Clicking opens a popup with multiple color selection methods including visual picker (click on hue/saturation gradient to select colors visually), hue/alpha sliders to fine-tune hue and transparency, RGB input to enter specific Red/Green/Blue values (0-255), hex input to enter hex color codes (#RRGGBB or #RRGGBBAA), and predefined swatches for quick selection. The Value is a hex color string (e.g., "#FF0000" for red, "#FF0000AA" for semi-transparent red). Supports alpha channel (transparency) in RGBA format. Use for applications requiring color customization like themes, charts, or design tools.
public RadzenColorPicker()Gets or sets the alpha label text.
public string AlphaText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the alpha label text. |
Gets or sets the blue color label text.
public string BlueText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the blue color label text. |
Gets or sets the button text.
public string ButtonText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the button text. |
Gets or sets the child content.
public RenderFragment ChildContent { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the child content. |
Gets or sets the close callback.
public EventCallback Close { get; set; }
| Type | Description |
|---|---|
| EventCallback | Gets or sets the close callback. |
Gets or sets the green color label text.
public string GreenText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the green color label text. |
Gets or sets the hexadecimal color label text.
public string HexText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the hexadecimal color label text. |
Gets or sets the icon.
public string Icon { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the icon. |
Gets or sets the icon color.
public string IconColor { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the icon color. |
Gets or sets the open callback.
public EventCallback Open { get; set; }
| Type | Description |
|---|---|
| EventCallback | Gets or sets the open callback. |
Gets or sets the popup aria label text.
public string PopupAriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the popup aria label text. |
Gets or sets the render mode.
public PopupRenderMode PopupRenderMode { get; set; }
| Type | Description |
|---|---|
| PopupRenderMode | Gets or sets the render mode. |
Gets or sets the red color label text.
public string RedText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the red color label text. |
Gets or sets a value indicating whether button is shown.
public bool ShowButton { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether button is shown. |
Gets or sets a value indicating whether colors are shown.
public bool ShowColors { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether colors are shown. |
Gets or sets a value indicating whether HSV is shown.
public bool ShowHSV { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether HSV is shown. |
Gets or sets a value indicating whether RGBA is shown.
public bool ShowRGBA { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether RGBA is shown. |
Gets or sets the toggle popup aria label text.
public string ToggleAriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the toggle popup aria label text. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| Task |