ColorPanel.SetColor
-------------------

Sets color.

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

MBS( "ColorPanel.SetColor"; Color ) 

**MBS**( **"ColorPanel.SetColor";** /\* Sets color. \*/  
**$Color**) /\* A color value.   
This can be a common color name or color in hex notation: # followed by 2 digits for red, green, blue and optional alpha, e.g. #FF0000 for full red.e.g. "#FF0000" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Color | A color value.    This can be a common color name or color in hex notation: # followed by 2 digits for red, green, blue and optional alpha, e.g. #FF0000 for full red. | "#FF0000" |

### Result

Returns OK or error.

### Description

Sets color.  
### Examples

Set red:

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

- [ColorPanel.GetColor](ColorPanelGetColor.md)
- [ColorPanel.GetColorName](ColorPanelGetColorName.md)
- [ColorPanel.SetAlpha](ColorPanelSetAlpha.md)
- [ColorPanel.SetColorChangedScript](ColorPanelSetColorChangedScript.md)
- [ColorPanel.Show](ColorPanelShow.md)

### Example Databases

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

This function checks for a license.

Created 13th June 2018 , last changed 19th September 2019

  
[ColorPanel.SetAlpha](ColorPanelSetAlpha.md) - [ColorPanel.SetColorChangedEvaluate](ColorPanelSetColorChangedEvaluate.md)

[HTML Version](ColorPanelSetColor.shtml)