Color32 Structure

KGy SOFT Drawing Libraries Help
Represents the same 32-bit ARGB color as the Color structure does but in a more optimized way for better performance and smaller memory consumption.

Namespace:  KGySoft.Drawing.Imaging
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.0.0
Syntax

public readonly struct Color32 : IEquatable<Color32>

The Color32 type exposes the following members.

Constructors

  NameDescription
Public methodColor32(Color)
Initializes a new instance of the Color32 struct from a Color instance.
Public methodColor32(Byte, Byte, Byte)
Initializes a new instance of the Color32 struct from RGB (red, green, and blue) values.
Public methodColor32(Byte, Byte, Byte, Byte)
Initializes a new instance of the Color32 struct from ARGB (alpha, red, green, and blue) values.
Top
Methods

  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to this Color32 instance.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Color32)
Determines whether the current Color32 instance is equal to another one.
Public methodStatic memberFromArgb(Int32)
Creates a Color32 structure from a 32-bit ARGB value.
Public methodStatic memberFromArgb(Byte, Color32)
Creates a Color32 instance from the specified Color32 structure, but with the new specified alpha value.
Public methodStatic memberFromGray
Creates a Color32 structure representing a grayscale color of the specified brightness.
Public methodStatic memberFromRgb
Creates a Color32 structure from a 24-bit RGB value. The highest byte of the specified integer is ignored and the A property of the result will be 255.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodToArgb
Gets the 32-bit ARGB value of this Color32 instance.
Public methodToColor
Converts this Color32 instance to a Color structure.
Public methodToGray
Gets a Color32 instance that represents the matching gray shade of this Color32 instance based on human perception.
Public methodToRgb
Gets the 24-bit RGB value of this Color32 instance. The most significant byte of the returned integer is zero.
Public methodToString
Gets the string representation of this Color32 instance.
(Overrides ValueTypeToString.)
Top
Operators

  NameDescription
Public operatorStatic memberEquality
Gets whether two Color32 structures are equal.
Public operatorStatic memberInequality
Gets whether two Color32 structures are different.
Top
Fields

  NameDescription
Public fieldA
Gets the alpha component value of this Color32 structure.
Public fieldB
Gets the blue component value of this Color32 structure.
Public fieldG
Gets the green component value of this Color32 structure.
Public fieldR
Gets the red component value of this Color32 structure.
Top
See Also

Reference