DynaPDF.SetTransparentColor
---------------------------

Sets the transparent color which is used for newly inserted images.

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

MBS( "DynaPDF.SetTransparentColor"; PDF; ColorValue ) 

**MBS**( **"DynaPDF.SetTransparentColor";** /\* Sets the transparent color which is used for newly inserted images. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$ColorValue**) /\* Color value defined in current color spacee.g. MBS("DynaPDF.RGB"; 255; 0; 0) \*/ 

### Parameters

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

### Result

Returns OK or error.

### Description

Sets the transparent color which is used for newly inserted images.   
Due to color interpolation during decompression of JPEG images, it not always possible to mask JPEG compressed images correctly.   
Default value = 16777215 (RGB White)  
See also [SetTransparentColor](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetTransparentColor.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetTransparentColor](DynaPDFGetTransparentColor.md)
- [DynaPDF.GetUseTransparency](DynaPDFGetUseTransparency.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.RGB](DynaPDFRGB.md)
- [DynaPDF.SetUseTransparency](DynaPDFSetUseTransparency.md)

This function checks for a license.

Created 6th February 2015 , last changed 6th February 2015

  
[DynaPDF.SetTextScaling](DynaPDFSetTextScaling.md) - [DynaPDF.SetTrapped](DynaPDFSetTrapped.md)

[HTML Version](DynaPDFSetTransparentColor.shtml)