# C1.Win.Bitmap.C1Bitmap.CreatePredefinedPalette

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Bitmap_C1Bitmap_CreatePredefinedPalette_" data-uid="C1.Win.Bitmap.C1Bitmap.CreatePredefinedPalette*">CreatePredefinedPalette Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Bitmap_C1Bitmap_CreatePredefinedPalette_" data-uid="C1.Win.Bitmap.C1Bitmap.CreatePredefinedPalette*"></a>
<h4 id="C1_Win_Bitmap_C1Bitmap_CreatePredefinedPalette_C1_Win_Bitmap_PaletteType_System_Boolean_" data-uid="C1.Win.Bitmap.C1Bitmap.CreatePredefinedPalette(C1.Win.Bitmap.PaletteType,System.Boolean)">CreatePredefinedPalette(PaletteType, 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 C1Bitmap.Palette CreatePredefinedPalette(PaletteType paletteType, bool addTransparentColor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreatePredefinedPalette(paletteType As PaletteType, addTransparentColor As Boolean) As C1Bitmap.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="C1.Win.Bitmap.PaletteType.html">PaletteType</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="C1.Win.Bitmap.C1Bitmap.html">C1Bitmap</a>.<a class="xref" href="C1.Win.Bitmap.C1Bitmap.Palette.html">Palette</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_Bitmap_C1Bitmap_CreatePredefinedPalette_C1_Win_Bitmap_PaletteType_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>
