DynaPDF.RGB
-----------

Calculates color value for RGB.

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

MBS( "DynaPDF.RGB"; Red; Green; Blue ) 

**MBS**( **"DynaPDF.RGB";** /\* Calculates color value for RGB. \*/  
**$Red**; /\* The red color component from 0 to 255.e.g. 0 \*/   
**$Green**; /\* The green color component from 0 to 255.e.g. 255 \*/   
**$Blue**) /\* The blue color component from 0 to 255.e.g. 255 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Red | The red color component from 0 to 255. | 0 |
| Green | The green color component from 0 to 255. | 255 |
| Blue | The blue color component from 0 to 255. | 255 |

### Result

Returns color value as number.

### Description

Calculates color value for RGB.  
For use with functions which take a color as a big number.  
Calculation is Blue \* 65536 + Green \* 256 + Red.  
Use it only if the color space is RGB.  
### Examples

Get a blue color value:

 MBS ( "DynaPDF.RGB"; 0; 0; 255 )  
<small>  
Example result: 16711680</small>Get a red color value:

 MBS ( "DynaPDF.RGB"; 255 )  
<small>  
Example result: 255</small>Write text in RGB colors:

 Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetColorSpace](DynaPDFSetColorSpace.md)"; $pdf ; "DeviceRGB") \]   
\# calculate color values for RBB   
Set Variable \[ $red ; Value: MBS ( "DynaPDF.RGB"; 255; 0; 0 ) \]   
Set Variable \[ $green ; Value: MBS ( "DynaPDF.RGB"; 0; 255; 0 ) \]   
Set Variable \[ $blue ; Value: MBS ( "DynaPDF.RGB"; 0; 0; 255 ) \]   
\# now write some text   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetTextRect](DynaPDFSetTextRect.md)"; $pdf ; 100; 100; 500; 200) \]   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.WriteFText](DynaPDFWriteFText.md)"; $pdf ; "left"; "Testing: " &amp;   
 "\\FC\[" &amp; $red &amp; "\]Red" &amp;   
 "\\FC\[" &amp; $green &amp; "\]Green" &amp;   
 "\\FC\[" &amp; $blue &amp; "\]Blue" ) \]  
### See also

- [DynaPDF.ReplacePattern](DynaPDFReplacePattern.md)
- [DynaPDF.SetColorSpace](DynaPDFSetColorSpace.md)
- [DynaPDF.SetFieldBackColor](DynaPDFSetFieldBackColor.md)
- [DynaPDF.SetFieldColor](DynaPDFSetFieldColor.md)
- [DynaPDF.SetFieldTextColor](DynaPDFSetFieldTextColor.md)
- [DynaPDF.SetStrokeColorValue](DynaPDFSetStrokeColorValue.md)
- [DynaPDF.SetTextRect](DynaPDFSetTextRect.md)
- [DynaPDF.SetTransparentColor](DynaPDFSetTransparentColor.md)
- [DynaPDF.SquareAnnot](DynaPDFSquareAnnot.md)
- [DynaPDF.WriteFText](DynaPDFWriteFText.md)

### Example Databases

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

### 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)
- [Neues MBS FileMaker Plugin 11.0](https://www.mbsplugins.de/archive/2021-01-19/Neues_MBS_FileMaker_Plugin_110/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 11.0 - More than 6400 Functions In One Plugin](https://www.mbsplugins.de/archive/2021-01-19/MBS_FileMaker_Plugin_110_-_Mor/monkeybreadsoftware_blog_filemaker)
- [News about the MBS FileMaker Plugin 10.2](https://www.mbsplugins.de/archive/2020-05-19/News_about_the_MBS_FileMaker_P/monkeybreadsoftware_blog_filemaker)
- [PDF Forms with MBS Plugin](https://www.mbsplugins.de/archive/2018-04-21/PDF_Forms_with_MBS_Plugin/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.0pr5](https://www.mbsplugins.de/archive/2014-01-27/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

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

This function is free to use.

Created 18th August 2014 , last changed 3th March 2022

  
[DynaPDF.Print.SetSetting](DynaPDFPrintSetSetting.md) - [DynaPDF.ReadImageFormat](DynaPDFReadImageFormat.md)

[HTML Version](DynaPDFRGB.shtml)