XL.ConditionalFormat.SetPatternForegroundColor
----------------------------------------------

Sets the foreground color of the fill pattern.

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

MBS( "XL.ConditionalFormat.SetPatternForegroundColor"; BookRef; ConditionalFormatRef; Value ) 

**MBS**( **"XL.ConditionalFormat.SetPatternForegroundColor";** /\* Sets the foreground color of the fill pattern. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$ConditionalFormatRef**; /\* The reference number for the conditional format.e.g. $ConditionalFormat \*/   
**$Value**) /\* The new color value.e.g. 10 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| ConditionalFormatRef | The reference number for the conditional format. | $ConditionalFormat |
| Value | The new color value. | 10 |

### Result

Returns OK or error.

### Description

Sets the foreground color of the fill pattern.  
### See also

- [XL.ConditionalFormat.GetPatternBackgroundColor](XLConditionalFormatGetPatternBackgroundColor.md)
- [XL.ConditionalFormat.GetPatternForegroundColor](XLConditionalFormatGetPatternForegroundColor.md)
- [XL.ConditionalFormat.SetPatternBackgroundColor](XLConditionalFormatSetPatternBackgroundColor.md)

Created 30th March 2024 , last changed 30th March 2024

  
[XL.ConditionalFormat.SetPatternBackgroundColor](XLConditionalFormatSetPatternBackgroundColor.md) - [XL.ConditionalFormating.Add2ColorScaleFormulaRule](XLConditionalFormatingAdd2ColorScaleFormulaRule.md)

[HTML Version](XLConditionalFormatSetPatternForegroundColor.shtml)