ColorPanel.GetColor
-------------------

Queries current color.

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

MBS( "ColorPanel.GetColor" { ; ReturnAsNumbers } ) 

**MBS**( **"ColorPanel.GetColor";** /\* Queries current color. \*/  
**$ReturnAsNumbers**) /\* Optional; Pass 1 to return color as list of red, green and blue, e.g. "123¶234¶56"  
Pass 0 (default) for return as hex value, e.g. "7788FF".e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ReturnAsNumbers | Pass 1 to return color as list of red, green and blue, e.g. "123¶234¶56"   Pass 0 (default) for return as hex value, e.g. "7788FF". | 0 | Optional |

### Result

Returns color or error.

### Description

Queries current color.  
Returns color as hex values, e.g. FF0000 for red.  
### Examples

Query color:

 Set Variable \[ $c ; Value: MBS ( "ColorPanel.GetColor" ) \]   
If \[ MBS ("IsError") = 0 \]   
 Set Field \[ Color Panel::Color ; "#" &amp; $c \]   
End If  
### See also

- [ColorPanel.GetAlpha](ColorPanelGetAlpha.md)
- [ColorPanel.GetColorName](ColorPanelGetColorName.md)
- [ColorPanel.SetColor](ColorPanelSetColor.md)
- [ColorPanel.SetColorChangedEvaluate](ColorPanelSetColorChangedEvaluate.md)
- [IsError](IsError.md)

### Release notes

- **Version 10.3**
    - Added [ColorPanel.GetColorName](https://www.mbsplugins.eu/ColorPanelGetColorName.shtml) function.
- **Version 10.1**
    - Added alpha part for returning color from [ColorPanel.GetColor](https://www.mbsplugins.eu/ColorPanelGetColor.shtml) and similar functions.

### Example Databases

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

### Blog Entries

- [MBS FileMaker Plugin, version 10.1pr6](https://www.mbsplugins.de/archive/2020-03-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 13th June 2018 , last changed 13th June 2018

  
[ColorPanel.GetAlpha](ColorPanelGetAlpha.md) - [ColorPanel.GetColorChangedEvaluate](ColorPanelGetColorChangedEvaluate.md)

[HTML Version](ColorPanelGetColor.shtml)