Struct Color
Represents an ARGB (alpha, red, green, blue) Color.
Inherited Members
Namespace: GameOverlay.Drawing
Assembly: GameOverlay.dll
Syntax
public struct Color
Constructors
| Improve this Doc View SourceColor(Color, Byte)
Initializes a new Color using the specified Color and the alpha value.
Declaration
public Color(Color color, byte alpha = 255)
Parameters
Type | Name | Description |
---|---|---|
Color | color | A Color structure. |
Byte | alpha | The alpha component of the Color. |
Color(Color, Int32)
Initializes a new Color using the specified Color and the alpha value.
Declaration
public Color(Color color, int alpha = 255)
Parameters
Type | Name | Description |
---|---|---|
Color | color | A Color structure. |
Int32 | alpha | The alpha component of the Color. |
Color(Color, Single)
Initializes a new Color using the specified Color and the alpha value.
Declaration
public Color(Color color, float alpha = 1F)
Parameters
Type | Name | Description |
---|---|---|
Color | color | A Color structure. |
Single | alpha | The alpha component of the Color. |
Color(Byte, Byte, Byte, Byte)
Initializes a new Color using the specified components.
Declaration
public Color(byte r, byte g, byte b, byte a = 255)
Parameters
Type | Name | Description |
---|---|---|
Byte | r | The red component value of this Color. |
Byte | g | The green component value of this Color. |
Byte | b | The blue component value of this Color. |
Byte | a | The alpha component value of this Color. |
Color(Int32, Int32, Int32, Int32)
Initializes a new Color using the specified components.
Declaration
public Color(int r, int g, int b, int a = 255)
Parameters
Type | Name | Description |
---|---|---|
Int32 | r | The red component value of this Color. |
Int32 | g | The green component value of this Color. |
Int32 | b | The blue component value of this Color. |
Int32 | a | The alpha component value of this Color. |
Color(Single, Single, Single, Single)
Initializes a new Color using the specified components.
Declaration
public Color(float r, float g, float b, float a = 1F)
Parameters
Type | Name | Description |
---|---|---|
Single | r | The red component value of this Color. |
Single | g | The green component value of this Color. |
Single | b | The blue component value of this Color. |
Single | a | The alpha component value of this Color. |
Fields
| Improve this Doc View SourceA
Gets the alpha component value of this Color.
Declaration
public float A
Field Value
Type | Description |
---|---|
Single |
B
Gets the blue component value of this Color.
Declaration
public float B
Field Value
Type | Description |
---|---|
Single |
G
Gets the green component value of this Color.
Declaration
public float G
Field Value
Type | Description |
---|---|
Single |
R
Gets the red component value of this Color.
Declaration
public float R
Field Value
Type | Description |
---|---|
Single |
Properties
| Improve this Doc View SourceBlue
Returns a blue Color.
Declaration
public static Color Blue { get; }
Property Value
Type | Description |
---|---|
Color |
Green
Returns a green Color.
Declaration
public static Color Green { get; }
Property Value
Type | Description |
---|---|
Color |
Red
Returns a red Color.
Declaration
public static Color Red { get; }
Property Value
Type | Description |
---|---|
Color |
Transparent
Returns a transparent Color.
Declaration
public static Color Transparent { get; }
Property Value
Type | Description |
---|---|
Color |
Methods
| Improve this Doc View SourceEquals(Color)
Returns a value indicating whether two specified instances of Color represent the same value.
Declaration
public bool Equals(Color value)
Parameters
Type | Name | Description |
---|---|---|
Color | value | An object to compare to this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Color, Color)
Returns a value indicating whether two specified instances of Color represent the same value.
Declaration
public static bool Equals(Color left, Color right)
Parameters
Type | Name | Description |
---|---|---|
Color | left | The first object to compare. |
Color | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Object)
Returns a value indicating whether this instance and a specified Object represent the same type and value.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Overrides
| Improve this Doc View SourceFromARGB(Int32)
Creates a Color structure from a 32-bit ARGB value.
Declaration
public static Color FromARGB(int value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | value | A value specifying the 32-bit ARGB value. |
Returns
Type | Description |
---|---|
Color | The Color structure that this method creates. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A 32-bit signed integer hash code. |
Overrides
| Improve this Doc View SourceToARGB()
Gets the 32-bit ARGB value of this Color structure.
Declaration
public int ToARGB()
Returns
Type | Description |
---|---|
Int32 | The 32-bit ARGB value of this Color. |
ToString()
Converts this Color structure to a human-readable string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation of this Color. |
Overrides
Operators
| Improve this Doc View SourceEquality(Color, Color)
Determines whether two specified instances are equal.
Declaration
public static bool operator ==(Color left, Color right)
Parameters
Type | Name | Description |
---|---|---|
Color | left | The first object to compare. |
Color | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |
Implicit(Color to RawColor4)
Converts a Color to a SharpDX RawColor4
Declaration
public static implicit operator RawColor4(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color |
Returns
Type | Description |
---|---|
SharpDX.Mathematics.Interop.RawColor4 |
Implicit(RawColor4 to Color)
Converts a SharpDX RawColor4 to a Color
Declaration
public static implicit operator Color(RawColor4 color)
Parameters
Type | Name | Description |
---|---|---|
SharpDX.Mathematics.Interop.RawColor4 | color | A RawColor4 |
Returns
Type | Description |
---|---|
Color |
Inequality(Color, Color)
Determines whether two specified instances are not equal.
Declaration
public static bool operator !=(Color left, Color right)
Parameters
Type | Name | Description |
---|---|---|
Color | left | The first object to compare. |
Color | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |