DynaPDF.CMYK
------------

Calculates color value for CMYK.

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

MBS( "DynaPDF.CMYK"; Cyan; Magenta; Yellow; Black ) 

**MBS**( **"DynaPDF.CMYK";** /\* Calculates color value for CMYK. \*/  
**$Cyan**; /\* The cyan color component from 0 to 255.e.g. 0 \*/   
**$Magenta**; /\* The magenta color component from 0 to 255.e.g. 0 \*/   
**$Yellow**; /\* The yellow color component from 0 to 255.e.g. 255 \*/   
**$Black**) /\* The black color component from 0 to 255.e.g. 255 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Cyan | The cyan color component from 0 to 255. | 0 |
| Magenta | The magenta color component from 0 to 255. | 0 |
| Yellow | The yellow color component from 0 to 255. | 255 |
| Black | The black color component from 0 to 255. | 255 |

### Result

Returns color value as number.

### Description

Calculates color value for CMYK.  
For use with functions which take a color as a big number.  
Calculation is Cyan \* 16777216 + Magenta \* 65536 + Yellow \* 256 + Black.  
Use it only if the color space is CMYK.  
### Examples

Get a black color value:

 MBS ( "DynaPDF.CMYK"; 0; 0; 0; 255 )  
Write text in CMYK colors:

 # set colorspace   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetColorSpace](DynaPDFSetColorSpace.md)"; $pdf ; "DeviceCMYK") \]   
  
\# calculate color values for CMYK   
Set Variable \[ $cyan ; Value: MBS ( "DynaPDF.CMYK"; 255; 0; 0; 0 ) \]   
Set Variable \[ $magenta ; Value: MBS ( "DynaPDF.CMYK"; 0; 255; 0; 0 ) \]   
Set Variable \[ $yellow ; Value: MBS ( "DynaPDF.CMYK"; 0; 0; 255; 0 ) \]   
Set Variable \[ $black ; Value: MBS ( "DynaPDF.CMYK"; 0; 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; $cyan &amp; "\]Cyan" &amp;  
 "\\FC\[" &amp; $Magenta &amp; "\]Magenta" &amp;  
 "\\FC\[" &amp; $Yellow &amp; "\]Yellow" &amp;  
 "\\FC\[" &amp; $Black &amp; "\]Black" ) \]  
### See also

- [DynaPDF.AddDeviceNSeparations](DynaPDFAddDeviceNSeparations.md)
- [DynaPDF.CreateSeparationCS](DynaPDFCreateSeparationCS.md)
- [DynaPDF.Lab](DynaPDFLab.md)
- [DynaPDF.SetColorSpace](DynaPDFSetColorSpace.md)
- [DynaPDF.SetExtColorSpace](DynaPDFSetExtColorSpace.md)
- [DynaPDF.SetFillColor](DynaPDFSetFillColor.md)
- [DynaPDF.SetFillColorValue](DynaPDFSetFillColorValue.md)
- [DynaPDF.SetStrokeColorValue](DynaPDFSetStrokeColorValue.md)
- [DynaPDF.SetTextRect](DynaPDFSetTextRect.md)
- [DynaPDF.WriteFTextEx](DynaPDFWriteFTextEx.md)

### Example Databases

- [DynaPDF/Change Separation Colorant](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Change%20Separation%20Colorant.shtml#2ScriptAnchor_)
- [DynaPDF/Create DeviceN ColorSpace](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20DeviceN%20ColorSpace.shtml#2ScriptAnchor_)

### Blog Entries

- [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)
- [MBS Filemaker Plugin, version 4.0pr5](https://www.mbsplugins.de/archive/2014-01-27/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 18th August 2014 , last changed 25th February 2026

  
[DynaPDF.Bezier23](DynaPDFBezier23.md) - [DynaPDF.ChangeAnnotName](DynaPDFChangeAnnotName.md)

[HTML Version](DynaPDFCMYK.shtml)