DynaPDF.SetFieldBackColor
-------------------------

Sets field background color.

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

MBS( "DynaPDF.SetFieldBackColor"; PDF; Color ) 

**MBS**( **"DynaPDF.SetFieldBackColor";** /\* Sets field background color. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Color**) /\* The new color value.e.g. MBS( "DynaPDF.RGB"; 0; 0; 255 ) \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Color | The new color value. | MBS( "DynaPDF.RGB"; 0; 0; 255 ) |

### Result

Returns OK or error.

### Description

Sets field background color.  
The function sets the background color used for newly created interactive form fields and annotations. Normal annotations support RGB colors only. Form fields support the color spaces DeviceRGB, DeviceGray, and DeviceCMYK. The color value must be defined in the current color space.  
If the background should appear transparent set the color to NO\_COLOR (4294967281).  
Default value = NO\_COLOR.  
For RGB you can calculate color as Blue\*65536+Green\*256+Red with color channels in range 0 to 255.  
You can use [DynaPDF.RGB](DynaPDFRGB.md) function to calculate RGB color value.  
See also [SetFieldBackColor](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetFieldBackColor.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.CreateButton](DynaPDFCreateButton.md)
- [DynaPDF.GetFieldBackColor](DynaPDFGetFieldBackColor.md)
- [DynaPDF.GetFieldBorderColor](DynaPDFGetFieldBorderColor.md)
- [DynaPDF.GetFieldColor](DynaPDFGetFieldColor.md)
- [DynaPDF.GetFieldTextColor](DynaPDFGetFieldTextColor.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.RGB](DynaPDFRGB.md)
- [DynaPDF.SetFieldBorderColor](DynaPDFSetFieldBorderColor.md)
- [DynaPDF.SetFieldColor](DynaPDFSetFieldColor.md)
- [DynaPDF.SetFieldTextColor](DynaPDFSetFieldTextColor.md)

### Example Databases

- [DynaPDF/Form/Form](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Form/Form.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Advent calendar - Door 6 - Sending Out Wishlist Forms](https://www.mbsplugins.de/archive/2024-12-06/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [PDF Forms with MBS Plugin](https://www.mbsplugins.de/archive/2018-04-21/PDF_Forms_with_MBS_Plugin/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2022, Seite 19](https://filemaker-magazin.de/neuigkeit/4172-Appetithappen-FMM_202201)

This function checks for a license.

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

  
[DynaPDF.SetFieldBBox](DynaPDFSetFieldBBox.md) - [DynaPDF.SetFieldBorderColor](DynaPDFSetFieldBorderColor.md)

[HTML Version](DynaPDFSetFieldBackColor.shtml)