# GrapeCity.Documents.Imaging.Windows.GcWicBitmap.CreatePredefinedPalette

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_CreatePredefinedPalette_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.CreatePredefinedPalette*">CreatePredefinedPalette Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_CreatePredefinedPalette_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.CreatePredefinedPalette*"></a>
<h4 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_CreatePredefinedPalette_GrapeCity_Documents_Imaging_Windows_WicPaletteType_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.CreatePredefinedPalette(GrapeCity.Documents.Imaging.Windows.WicPaletteType,System.Boolean)">CreatePredefinedPalette(WicPaletteType, bool)</h4>
<div class="markdown level1 summary"><p>Creates one of the pre-defined palettes specified by PaletteType and optionally adds a transparent color.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GcWicBitmap.Palette CreatePredefinedPalette(WicPaletteType paletteType, bool addTransparentColor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreatePredefinedPalette(paletteType As WicPaletteType, addTransparentColor As Boolean) As GcWicBitmap.Palette</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Imaging.Windows.WicPaletteType.html">WicPaletteType</a></td>
      <td><span class="parametername">paletteType</span></td>
      <td><p>The desired pre-defined palette type.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">addTransparentColor</span></td>
      <td><p>The optional transparent color to add to the palette. If no transparent color is needed, use false. When initializing to a grayscale or black and white palette, set this parameter to false.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.html">GcWicBitmap</a>.<a class="xref" href="GrapeCity.Documents.Imaging.Windows.GcWicBitmap.Palette.html">Palette</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Imaging_Windows_GcWicBitmap_CreatePredefinedPalette_GrapeCity_Documents_Imaging_Windows_WicPaletteType_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>For palettes with less than 256 entries, the transparent entry is added to the end of the palette
(that is, a 16-color palette becomes a 17-color palette). For palettes with 256 colors, the transparent
palette entry will replace the last entry in the pre-defined palette.</p>
</div>
</div>
