ColorPanel.Choose
-----------------

Shows color chooser.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ColorPanel](component_ColorPanel.md) | [8.3](newinversion83.md) | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "ColorPanel.Choose"; Color { ; Expand } ) 

**MBS**( **"ColorPanel.Choose"** /\* Shows color chooser. \*/  
**$Color**; /\* The color to prefill. \*/   
**$Expand**) /\* Optional; Whether to show dialog expanded.  
Default is 0 to show collapsed. Pass 1 for expanded view. e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Color | The color to prefill. |  |  |
| Expand | Whether to show dialog expanded.   Default is 0 to show collapsed. Pass 1 for expanded view. | 1 | Optional      Added in version **10.2**. |

### Result

Returns color, Cancel or error.

### Description

Shows color chooser.  
If you pass a color, it's preselected.  
  
Versions until 8.5 return OK when cancel was selected. This was corrected for 9.0.  
Windows may not select the given color if it doesn't like it.  
### Examples

Choose color:

 MBS ( "ColorPanel.Choose"; "#FF0000")  
### See also

- [ColorPanel.Show](ColorPanelShow.md)

### Release notes

- **Version 10.2**
    - Added Expand parameter for [ColorPanel.Choose](https://www.mbsplugins.eu/ColorPanelChoose.shtml) function.
- **Version 9.0**
    - Improved [ColorPanel.Choose](http://www.mbsplugins.eu/ColorPanelChoose.shtml) with passing color and result.

### Example Databases

- [Color Panel](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Color%20Panel.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 10.2pr8](https://www.mbsplugins.de/archive/2020-05-09/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.6pr1](https://www.mbsplugins.de/archive/2018-12-01/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.3pr2](https://www.mbsplugins.de/archive/2018-06-18/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 13th June 2018 , last changed 8th May 2020

  
[Clipboard.SetText](ClipboardSetText.md) - [ColorPanel.GetAlpha](ColorPanelGetAlpha.md)

[HTML Version](ColorPanelChoose.shtml)