DynaPDF.Table.SetColorFloat
---------------------------

Sets or changes the specified color and color space.

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

MBS( "DynaPDF.Table.SetColorFloat"; Table; Row; Col; Type; CS; CSHandle; Colors ) 

**MBS**( **"DynaPDF.Table.SetColorFloat";** /\* Sets or changes the specified color and color space. \*/  
**$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" \*/   
**$CS**; /\* The colorspace to use. Can be DeviceRGB, DeviceCMYK, DeviceGray.e.g. "DeviceRGB" \*/   
**$CSHandle**; /\* Color space handle of non-device color space. \*/   
**$Colors**) /\* Color values. Pass as many parameters as needed. Range from 0 to 1.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" |
| CS | The colorspace to use. Can be DeviceRGB, DeviceCMYK, DeviceGray. | "DeviceRGB" |
| CSHandle | Color space handle of non-device color space. |  |
| Colors | Color values. Pass as many parameters as needed. Range from 0 to 1. | 0 |

### Result

Returns OK or error.

### Description

Sets or changes the specified color and color space.   
The number of color components must match the number of components of the color space. The text color is inherited from the table, column, and row, in this order. The border color is inherited from columns and rows but not from the table since the table has its own border.  
Extended color spaces will be deleted when the PDF file in memory is closed or when [DynaPDF.Release](DynaPDFRelease.md) was called. The color spaces must be recreated when the table should be drawn in another PDF file. Color space handles may change when recreated in another PDF file. All such colors should be set again to avoid issues with invalid color space handles.  
Width exception of Lab colors, color values are in the range 0 through 1. Lab colors support different ranges for the L\*, a\*, and b\* components:  
L\*-&gt; 0..100  
a\* -&gt; -128 .. 127  
b\* -&gt; -128 .. 127  
### Examples

Set green text color:

 MBS ( "DynaPDF.Table.SetColorFloat"; $table ; $Row ; $Col ; "TextColor"; "DeviceRGB"; 0; 1; 0 )  
### See also

- [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)
- [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)
- [DynaPDF.Table.SetCellAction](DynaPDFTableSetCellAction.md)
- [DynaPDF.Table.SetCellTemplate](DynaPDFTableSetCellTemplate.md)
- [DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)
- [DynaPDF.Table.SetColOrRowSpan](DynaPDFTableSetColOrRowSpan.md)
- [DynaPDF.Table.SetColWidth](DynaPDFTableSetColWidth.md)
- [DynaPDF.Table.SetFontSelMode](DynaPDFTableSetFontSelMode.md)
- [DynaPDF.Table.SetGridWidth](DynaPDFTableSetGridWidth.md)
- [DynaPDF.Table.SetRGBColor](DynaPDFTableSetRGBColor.md)

### Release notes

- **Version 12.0**
    - Documented missing color space handle parameter for [DynaPDF.Table.SetColorFloat](https://www.mbsplugins.eu/DynaPDFTableSetColorFloat.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 11.6pr3](https://www.mbsplugins.de/archive/2021-12-14/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 10th December 2021

  
[DynaPDF.Table.SetColor](DynaPDFTableSetColor.md) - [DynaPDF.Table.SetFlags](DynaPDFTableSetFlags.md)

[HTML Version](DynaPDFTableSetColorFloat.shtml)