DynaPDF.CreateICCBasedColorSpace
--------------------------------

Creates an ICC-based color space.

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

MBS( "DynaPDF.CreateICCBasedColorSpace"; PDF; FilePath ) 

**MBS**( **"DynaPDF.CreateICCBasedColorSpace";** /\* Creates an ICC-based color space. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$FilePath**) /\* The native file path for the ICC profile file.e.g. "/Users/cs/Desktop/profile.icc" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| FilePath | The native file path for the ICC profile file. | "/Users/cs/Desktop/profile.icc" |

### Result

Returns number or error.

### Description

Creates an ICC-based color space.   
ICC-based color spaces (PDF 1.3) are based on a cross-platform color profile as defined by the International Color Consortium (ICC). Unlike the CalGray, CalRGB, and Lab color spaces, which are characterized by entries in the color space dictionary, an ICC-based color space is characterized by a sequence of bytes in a standard format.   
An ICC profile describes the color characteristics of a particular device and it provides necessary information to convert color data between native device color spaces and device independent color spaces. The ICC specification classifies color devices according to their use as input or output devices such as monitors, scanners, cameras or printers. Depending on the output PDF format different device classes are supported.   
If the function succeeds the return value is the color space handle.  
See also [CreateICCBasedColorSpace](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CreateICCBasedColorSpace.shtml) function in DynaPDF manual.

### Examples

Creates an ICC Profile:

 Set Variable \[ $cs ; Value: MBS ("DynaPDF.CreateICCBasedColorSpace"; $pdf ; "/Users/cs/Desktop/CMYK.icc") \]   
Set Variable \[ $r ; Value: MBS ( "[DynaPDF.SetExtColorSpace](DynaPDFSetExtColorSpace.md)"; $PDF ; $cs ) \]   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetFillColor](DynaPDFSetFillColor.md)"; $pdf ; 1; 0; 0) \]   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.WriteText](DynaPDFWriteText.md)"; $pdf ; 100; 100; "Some cyan text") \]  
### See also

- [DynaPDF.CreateDeviceNColorSpace](DynaPDFCreateDeviceNColorSpace.md)
- [DynaPDF.CreateICCBasedColorSpaceContainer](DynaPDFCreateICCBasedColorSpaceContainer.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetExtColorSpace](DynaPDFSetExtColorSpace.md)
- [DynaPDF.SetFillColor](DynaPDFSetFillColor.md)
- [DynaPDF.WriteText](DynaPDFWriteText.md)

### Release notes

- **Version 14.5**
    - Improved [DynaPDF.GeneratePreview](https://www.mbsplugins.eu/DynaPDFGeneratePreview.shtml), [DynaPDF.ReadImageResolution](https://www.mbsplugins.eu/DynaPDFReadImageResolution.shtml), [DynaPDF.ReadImageFormat](https://www.mbsplugins.eu/DynaPDFReadImageFormat.shtml), [DynaPDF.InsertImage](https://www.mbsplugins.eu/DynaPDFInsertImage.shtml), [DynaPDF.AttachFileContainer](https://www.mbsplugins.eu/DynaPDFAttachFileContainer.shtml), [DynaPDF.AddOutputIntentEx](https://www.mbsplugins.eu/DynaPDFAddOutputIntentEx.shtml), [DynaPDF.CreateICCBasedColorSpaceContainer](https://www.mbsplugins.eu/DynaPDFCreateICCBasedColorSpaceContainer.shtml) and [DynaPDF.OpenPDFFromContainer](https://www.mbsplugins.eu/DynaPDFOpenPDFFromContainer.shtml) to return proper error if container is empty.
- **Version 13.0**
    - Added [DynaPDF.CreateICCBasedColorSpace](https://www.mbsplugins.eu/DynaPDFCreateICCBasedColorSpace.shtml) and [DynaPDF.CreateICCBasedColorSpaceContainer](https://www.mbsplugins.eu/DynaPDFCreateICCBasedColorSpaceContainer.shtml).

### Blog Entries

- [New in MBS FileMaker Plugin 13.0](https://www.mbsplugins.de/archive/2023-01-24/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.6pr2](https://www.mbsplugins.de/archive/2022-12-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 1st December 2022 , last changed 1st December 2022

  
[DynaPDF.CreateGroupField](DynaPDFCreateGroupField.md) - [DynaPDF.CreateICCBasedColorSpaceContainer](DynaPDFCreateICCBasedColorSpaceContainer.md)

[HTML Version](DynaPDFCreateICCBasedColorSpace.shtml)