Inheritance
System.Object
Color
public class Color : IEquatable<Color>
Constructors
Declaration
Parameters
Type |
Name |
Description |
System.Int64 |
value |
|
Fields
Declaration
public static readonly Color black
Field Value
Declaration
public static readonly Color clear
Field Value
Declaration
public readonly long value
Field Value
Type |
Description |
System.Int64 |
|
Declaration
public static readonly Color white
Field Value
Properties
Declaration
public int alpha { get; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public int green { get; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public float opacity { get; }
Property Value
Type |
Description |
System.Single |
|
Declaration
Property Value
Type |
Description |
System.Int32 |
|
Methods
Declaration
public float computeLuminance()
Returns
Type |
Description |
System.Single |
|
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
Declaration
public bool Equals(Color other)
Parameters
Type |
Name |
Description |
Color |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static Color fromARGB(int a, int r, int g, int b)
Parameters
Type |
Name |
Description |
System.Int32 |
a |
|
System.Int32 |
r |
|
System.Int32 |
g |
|
System.Int32 |
b |
|
Returns
Declaration
public static Color fromRGBO(int r, int g, int b, float opacity)
Parameters
Type |
Name |
Description |
System.Int32 |
r |
|
System.Int32 |
g |
|
System.Int32 |
b |
|
System.Single |
opacity |
|
Returns
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Declaration
public static Color lerp(Color a, Color b, float t)
Parameters
Type |
Name |
Description |
Color |
a |
|
Color |
b |
|
System.Single |
t |
|
Returns
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Declaration
public Color withAlpha(int a)
Parameters
Type |
Name |
Description |
System.Int32 |
a |
|
Returns
Declaration
public Color withBlue(int b)
Parameters
Type |
Name |
Description |
System.Int32 |
b |
|
Returns
Declaration
public Color withGreen(int g)
Parameters
Type |
Name |
Description |
System.Int32 |
g |
|
Returns
Declaration
public Color withOpacity(float opacity)
Parameters
Type |
Name |
Description |
System.Single |
opacity |
|
Returns
Declaration
public Color withRed(int r)
Parameters
Type |
Name |
Description |
System.Int32 |
r |
|
Returns
Operators
Declaration
public static bool operator ==(Color a, Color b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool operator !=(Color a, Color b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Extension Methods