---
title: "ColorPalette.Create Method (Bitmap, Int32, ColorQuantizationAlgorithm, Int32)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ColorPalette_Create_4_619e072e.htm
product: "Graphics Mill"
---

# ColorPalette.Create Method (Bitmap, Int32, ColorQuantizationAlgorithm, Int32)
 
Returns a new [ColorPalette](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_ColorPalette.htm.md) with a given size containing colors generated from a given bitmap using the specified quantiztion algorithm.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public static ColorPalette Create(Bitmap bitmap,int entryCount,ColorQuantizationAlgorithm quantizationAlgorithm,int paletteAlphaThreshold
)
```
 
### Parameters
 
 - bitmap
     - Type: [Aurigma.GraphicsMill.Bitmap](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md)
A [Bitmap](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md) to create this palette from.

 - entryCount
     - Type: System.Int32
The number of colors in the palette.

 - quantizationAlgorithm
     - Type: [Aurigma.GraphicsMill.Transforms.ColorQuantizationAlgorithm](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_ColorQuantizationAlgorithm.htm.md)
A color quantiztion algorithm used to reduce colors.

 - paletteAlphaThreshold
     - Type: System.Int32
The alpha channel threshold.
 
### Return Value
The [ColorPalette](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_ColorPalette.htm.md) class instance.
   
## See Also

### Reference

- [ColorPalette Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_ColorPalette.htm.md)
- [Create Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_ColorPalette_Create.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
