[]
Represents a palette color for an indexed bitmap.
public struct PaletteEntry : IEquatable<PaletteEntry>, IFormattable
Creates a PaletteEntry with given (premultiplied by alpha) values for the color channels.
public PaletteEntry(int r, int g, int b, int a)
r
intThe Red channel value (0..65535), premultiplied by the associated alpha component.
g
intThe Green channel value (0..65535), premultiplied by the associated alpha component.
b
intThe Blue channel value (0..65535), premultiplied by the associated alpha component.
a
intThe Alpha channel value (0..65535).
Creates a PaletteEntry with given values for the color channels.
public PaletteEntry(int r, int g, int b)
r
intThe Red channel value (0..65535).
g
intThe Green channel value (0..65535).
b
intThe Blue channel value (0..65535).
Gets or sets a value of the Alpha channel (if applicable).
public ushort A { get; set; }
Gets or sets a value of the Blue channel.
If applicable, the value must be premultiplied by the associated alpha component.
public ushort B { get; set; }
Gets or sets a value of the Green channel.
If applicable, the value must be premultiplied by the associated alpha component.
public ushort G { get; set; }
Gets or sets a value of the Red channel.
If applicable, the value must be premultiplied by the associated alpha component.
public ushort R { get; set; }
Determines whether the specified PaletteEntry is equal to this instance.
public bool Equals(PaletteEntry other)
other
PaletteEntryDetermines whether the specified object is equal to this instance.
public override bool Equals(object value)
value
objectReturns a hash code for this instance.
public override int GetHashCode()
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Returns a string that represents the current object.
public override string ToString()
Returns a string that represents this instance.
public string ToString(IFormatProvider formatProvider)
formatProvider
System.IFormatProviderThe format provider.
A string that represents this instance.
Returns a string that represents this instance.
public string ToString(string format, IFormatProvider formatProvider)
format
stringThe format.
formatProvider
System.IFormatProviderThe format provider.
A string that represents this instance.
Returns a string that represents this instance.
public string ToString(string format)
format
stringThe format.
A string that represents this instance.
Determines if the specified values are equal.
public static bool operator ==(PaletteEntry left, PaletteEntry right)
left
PaletteEntryright
PaletteEntryDetermines if the specified values are not equal.
public static bool operator !=(PaletteEntry left, PaletteEntry right)
left
PaletteEntryright
PaletteEntry