XL.Book.SetRGBMode
------------------

Sets a RGB mode.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [3.5](newinversion35.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Book.SetRGBMode"; BookRef; Value ) 

**MBS**( **"XL.Book.SetRGBMode";** /\* Sets a RGB mode. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$Value**) /\* The new setting. Pass 0 or 1.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| Value | The new setting. Pass 0 or 1. | 0 |

### Result

Returns OK or error.

### Description

Sets a RGB mode.   
1: RGB mode, 0: Index mode (default).   
In RGB mode use XL.ColorPack and XL.ColorUnpack methods for getting/setting colors.  
### Examples

Enable RGB mode:

 Set Variable \[ $logoID ; Value: MBS ( "XL.Book.SetRGBMode"; $book ; 1 ) \]  
### See also

- [XL.Book.GetCalcMode](XLBookGetCalcMode.md)
- [XL.Book.GetRGBMode](XLBookGetRGBMode.md)
- [XL.Book.SetCalcMode](XLBookSetCalcMode.md)
- [XL.Format.SetPatternBackgroundColor](XLFormatSetPatternBackgroundColor.md)

### Example Databases

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

This function checks for a license.

Created 18th August 2014 , last changed 2nd November 2021

  
[XL.Book.SetDefaultFont](XLBookSetDefaultFont.md) - [XL.Book.SetRefR1C1](XLBookSetRefR1C1.md)

[HTML Version](XLBookSetRGBMode.shtml)