Class

# WebColorPicker

<div class="rst-class">

forsearch

</div>

Color Picker

<div class="rst-class">

forsearch

</div>

ColorPicker

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Displays a color picker.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                | Type                               | Read-Only | Shared |
|-------------------------------------|------------------------------------|-----------|--------|
| `HasAlpha<webcolorpicker.hasalpha>` | `Boolean</api/data_types/boolean>` |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                        | Parameters                                                                                                                                                                                | Returns | Shared |
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Hide<webcolorpicker.hide>` |                                                                                                                                                                                           |         |        |
| `Show<webcolorpicker.show>` | initialColor As `Color</api/data_types/color>`, left As `Integer</api/data_types/integer>` = 0, top As `Integer</api/data_types/integer>` = 0                                             |         |        |
|                             | initialColor As `Color</api/data_types/color>`, prompt As `String</api/data_types/string>`, left As `Integer</api/data_types/integer>` = 0, top As `Integer</api/data_types/integer>` = 0 |         |        |
|                             | initialColor As `Color</api/data_types/color>`, prompt As `String</api/data_types/string>`, parentControl As `WebUIControl</api/user_interface/web/webuicontrol>`                         |         |        |
|                             | initialColor As `Color</api/data_types/color>`, parentControl As `WebUIControl</api/user_interface/web/webuicontrol>`                                                                     |         |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                          | Parameters                                      | Returns |
|-----------------------------------------------|-------------------------------------------------|---------|
| `ColorSelected<webcolorpicker.colorselected>` | selectedColor As `Color</api/data_types/color>` |         |
| `Dismissed<webcolorpicker.dismissed>`         |                                                 |         |
| `Shown<webcolorpicker.shown>`                 |                                                 |         |

## Property descriptions

<div id="webcolorpicker.hasalpha">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebColorPicker.HasAlpha

**HasAlpha** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the color selected will be returned with an alpha channel.
>
> The default value is `True</api/language/true>`.

## Method descriptions

<div id="webcolorpicker.hide">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebColorPicker.Hide

**Hide**

> Hides the color picker.

<div id="webcolorpicker.show">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebColorPicker.Show

**Show**(initialColor As `Color</api/data_types/color>`, left As `Integer</api/data_types/integer>` = 0, top As `Integer</api/data_types/integer>` = 0)

> Displays the color picker using the color and location passed.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Show**(initialColor As `Color</api/data_types/color>`, prompt As `String</api/data_types/string>`, left As `Integer</api/data_types/integer>` = 0, top As `Integer</api/data_types/integer>` = 0)

> Displays the color picker using the color, prompt and location passed.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Show**(initialColor As `Color</api/data_types/color>`, prompt As `String</api/data_types/string>`, parentControl As `WebUIControl</api/user_interface/web/webuicontrol>`)

> Displays the color picker using the color, prompt and parent control passed.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Show**(initialColor As `Color</api/data_types/color>`, parentControl As `WebUIControl</api/user_interface/web/webuicontrol>`)

> Displays the color picker using the color and parent control passed.

## Event descriptions

<div id="webcolorpicker.colorselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebColorPicker.ColorSelected

**ColorSelected**(selectedColor As `Color</api/data_types/color>`)

> The user selected the color passed.

<div id="webcolorpicker.dismissed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebColorPicker.Dismissed

**Dismissed**

> Called when the color picker is dismissed by calling its Hide or Close methods.

<div id="webcolorpicker.shown">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebColorPicker.Shown

**Shown**

> The control has appeared on the currently displayed page. This could be because its parent page just finished loading, its parent page has come to the foreground or the control is now visible having been previously invisible because it or its parent control's Visible property has been set to `True</api/language/true>`.
>
> Use the Shown event for initializing your controls or doing anything that would interact with other controls or user interface elements on the web page instead of the `Opening<webcontrol.opening>` event.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This event is the web equivalent to the `DesktopWindow.Activated<desktopwindow.activated>` event.
>
> </div>

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | Web |
| **Operating Systems** | All |

<div class="seealso">

`WebControl</api/user_interface/web/webcontrol>` parent class; `DesktopColorPicker</api/user_interface/desktop/desktopcolorpicker>` and `MobileColorPicker</api/user_interface/mobile/mobilecolorpicker>` classes.

</div>
