BitmapPalettes Class
Defines several color palettes that are commonly used by bitmap images.
Assembly: PresentationCore (in PresentationCore.dll)
The BitmapPalettes type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | BlackAndWhite | Gets a value that represents a black-and-white color palette. This palette consists of 2 colors total. |
![]() ![]() | BlackAndWhiteTransparent | Gets a value that represents a black, white, and transparent color palette. This palette consists of 3 colors total. |
![]() ![]() | Gray16 | Gets a value that represents a color palette that contains 16 shades of gray. The palette ranges from black to gray to white. This palette contains 16 total colors. |
![]() ![]() | Gray16Transparent | Gets a value that represents a color palette that contains 16 shades of gray. The palette ranges from black to gray to white with an additional transparent color. This palette contains 17 total colors. |
![]() ![]() | Gray256 | Gets a value that represents a color palette that contains 256 shades of gray, ranging from black to gray to white. This palette contains 256 total colors. |
![]() ![]() | Gray256Transparent | Gets a value that represents a color palette that contains 256 shades of gray, ranging from black to gray to white with an additional transparent color. This palette contains 257 total colors. |
![]() ![]() | Gray4 | Gets a value that represents a color palette that contains 4 shades of gray, ranging from black to gray to white. This palette contains 4 total colors. |
![]() ![]() | Gray4Transparent | Gets a value that represents a color palette that contains 4 shades of gray, ranging from black to gray to white with an additional transparent color. This palette contains 5 total colors. |
![]() ![]() | Halftone125 | Gets a value that represents a color palette that contains 125 primary colors and 16 system colors, with duplicate colors removed. There are a total of 133 colors in this palette. |
![]() ![]() | Halftone125Transparent | Gets a value that represents a color palette that contains 125 primary colors, 16 system colors, and 1 additional transparent color. Duplicate colors in the palette are removed. There are a total of 134 colors in this palette. |
![]() ![]() | Halftone216 | Gets a value that represents a color palette that contains 216 primary colors and 16 system colors, with duplicate colors removed. There are a total of 224 colors in this palette. |
![]() ![]() | Halftone216Transparent | Gets a value that represents a color palette that contains 216 primary colors, 16 system colors, and 1 additional transparent color. Duplicate colors in the palette are removed. There are a total of 225 colors in this palette. |
![]() ![]() | Halftone252 | Gets a value that represents a color palette that contains 252 primary colors and 16 system colors, with duplicate colors removed. There are a total of 256 colors in this palette. |
![]() ![]() | Halftone252Transparent | Gets a value that represents a color palette that contains 252 primary colors, 16 system colors, and 1 additional transparent color. Duplicate colors in the palette are removed. There are a total of 256 colors in this palette. |
![]() ![]() | Halftone256 | Gets a value that represents a color palette that contains 256 primary colors and 16 system colors, with duplicate colors removed. There are a total of 256 colors in this palette. |
![]() ![]() | Halftone256Transparent | Gets a value that represents a color palette that contains 256 primary colors, 16 system colors, and 1 additional transparent color that replaces the final color in the sequence. Duplicate colors in the palette are removed. There are a total of 256 colors in this palette. |
![]() ![]() | Halftone27 | Gets a value that represents a color palette that contains 27 primary colors and 16 system colors, with duplicate colors removed. There are a total of 35 colors in this palette. |
![]() ![]() | Halftone27Transparent | Gets a value that represents a color palette that contains 27 primary colors and 16 system colors, with duplicate colors removed and 1 additional transparent color. There are a total of 36 colors in this palette. |
![]() ![]() | Halftone64 | Gets a value that represents a color palette that contains 64 primary colors and 16 system colors, with duplicate colors removed. There are a total of 72 colors in this palette. |
![]() ![]() | Halftone64Transparent | Gets a value that represents a color palette that contains 64 primary colors and 16 system colors, with duplicate colors removed and 1 additional transparent color. There are a total of 73 colors in this palette. |
![]() ![]() | Halftone8 | Gets a value that represents a color palette that contains 8 primary colors and 16 system colors, with duplicate colors removed. There are a total of 16 colors in this palette, which are the same as the system palette. |
![]() ![]() | Halftone8Transparent | Gets a value that represents a color palette that contains 8 primary colors and 16 system colors, with duplicate colors removed and 1 additional transparent color. There are a total of 17 colors in this palette. |
![]() ![]() | WebPalette | Gets a value that represents a color palette that contains 216 primary colors and 16 system colors, with duplicate colors removed. There are a total of 224 colors in this palette. |
![]() ![]() | WebPaletteTransparent | Gets a value that represents a color palette that contains 216 primary colors and 16 system colors, with duplicate colors removed and 1 additional transparent color. There are a total of 225 colors in this palette. |
BitmapPalettes properties whose names end with "Transparent" have an additional "color" that is fully transparent. In the case of palettes that already have 256 colors, the last color is replaced by the transparent color.
Only Tagged Image File Format (TIFF) and Graphics Interchange Format (GIF) image formats support palettes.
The following code example demonstrates how to construct a new BitmapSource by using a member of the BitmapPalettes class in a similar way.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
