DynaPDF.Table.SetRGBColor
-------------------------

Sets RGB color.

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

MBS( "DynaPDF.Table.SetRGBColor"; Table; Row; Col; Type; Red; Green; Blue ) 

**MBS**( **"DynaPDF.Table.SetRGBColor";** /\* Sets RGB color. \*/  
**$Table**; /\* The identifier for the table. \*/   
**$Row**; /\* The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1. Pass -1 for all rows.e.g. 0 \*/   
**$Col**; /\* The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1. Pass -1 for all columns.e.g. 0 \*/   
**$Type**; /\* Which table color. Can be BackColor, BorderColor, GridHorzColor, GridVertColor, ImageColor or TextColor.e.g. "TextColor" \*/   
**$Red**; /\* The red color component. Range is from 0 to 255.e.g. 0 \*/   
**$Green**; /\* The green color component. Range is from 0 to 255.e.g. 0 \*/   
**$Blue**) /\* The blue color component. Range is from 0 to 255.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Table | The identifier for the table. | $Table |
| Row | The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1. Pass -1 for all rows. | 0 |
| Col | The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1. Pass -1 for all columns. | 0 |
| Type | Which table color. Can be BackColor, BorderColor, GridHorzColor, GridVertColor, ImageColor or TextColor. | "TextColor" |
| Red | The red color component. Range is from 0 to 255. | 0 |
| Green | The green color component. Range is from 0 to 255. | 0 |
| Blue | The blue color component. Range is from 0 to 255. | 0 |

### Result

Returns OK or error.

### Description

Sets RGB color.  
See also [DynaPDF.Table.SetColorFloat](DynaPDFTableSetColorFloat.md).  
### Examples

Set green text color:

 MBS ( "DynaPDF.Table.SetRGBColor"; $table ; $Row ; $Col ; "TextColor"; 0; 255; 0 )  
Set white border color:

 MBS ("DynaPDF.Table.SetRGBColor"; $table ; -1; -1; "BorderColor"; 255; 255; 255)  
Set blue grid lines:

 Set Variable \[ $r ; Value:MBS ("DynaPDF.Table.SetRGBColor"; $table ; -1; -1; "GridHorzColor"; 0; 0; 255) \]  
Set Variable \[ $r ; Value:MBS ("DynaPDF.Table.SetRGBColor"; $table ; -1; -1; "GridVertColor"; 0; 0; 255) \]  
Set Variable \[ $r ; Value:MBS ("[DynaPDF.Table.SetGridWidth](DynaPDFTableSetGridWidth.md)"; $table ; 1; 1) \]  
### See also

- [DynaPDF.Table.Create](DynaPDFTableCreate.md)
- [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)
- [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)
- [DynaPDF.Table.SetColor](DynaPDFTableSetColor.md)
- [DynaPDF.Table.SetColorFloat](DynaPDFTableSetColorFloat.md)
- [DynaPDF.Table.SetGridWidth](DynaPDFTableSetGridWidth.md)

### Example Databases

- [DynaPDF/Catalog with tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Catalog%20with%20tables.shtml#1ScriptAnchor_)
- [DynaPDF/Invoice/Invoice](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Invoice/Invoice.shtml#3ScriptAnchor_)
- [DynaPDF/Report](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Report.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 1st June 2021

  
[DynaPDF.Table.SetPDF](DynaPDFTableSetPDF.md) - [DynaPDF.Table.SetRowHeight](DynaPDFTableSetRowHeight.md)

[HTML Version](DynaPDFTableSetRGBColor.shtml)