ColorPalette Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines an array of colors that make up a color palette. The colors are 32-bit ARGB colors. Not inheritable.
public ref class ColorPalette sealed
public sealed class ColorPalette
type ColorPalette = class
Public NotInheritable Class ColorPalette
- Inheritance
-
ColorPalette
You are not allowed to construct a ColorPalette object directly. If you created a ColorPalette object, you could then manipulate the palette size for a particular image, which is not allowed. Use the Image.Palette property to obtain a ColorPalette object.
The colors in the palette are limited to 32-bit ARGB colors. A 32-bit ARGB color has 8 bits each for alpha, red, green, and blue values. The lowest 8 bits make up the blue bit, the next 8 bits are green, the next 8 bits are red, and the most significant 8 bits are alpha. This means each component can vary from 0 to 255. Fully on is 255 and fully off is 0. Alpha is used to make the color value transparent (alpha = 0) or opaque (alpha = 255). The number of intensity levels in the image can be increased without increasing the number of colors used. This process creates what is called a halftone, and it offers increased contrast at a cost of decreased resolution.
Color |
Creates a custom color palette. |
Color |
Creates a standard color palette. |
Entries |
Gets an array of Color structures. |
Flags |
Gets a value that specifies how to interpret the color information in the array of colors. |
Create |
Creates an optimal color palette based on the colors in a given bitmap. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Produkt | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET er et åben kildekode projekt. Vælg et link for at give feedback: