Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
- API Level:
- preview
The Color is a struct to record the check's state.
Constructors
View Source
Color(Int32, Int32, Int32)
Creates and initializes a new instance of the Color class
with RGB parameters.
Declaration
public Color(int r, int g, int b)
Parameters
Type |
Name |
Description |
System.Int32 |
r |
Red of RGB.
|
System.Int32 |
g |
Green of RGB.
|
System.Int32 |
b |
Blue of RGB.
|
API Level: preview
View Source
Color(Int32, Int32, Int32, Int32)
Creates and initializes a new instance of the Color class
with RGBA parameters.
Declaration
public Color(int r, int g, int b, int a)
Parameters
Type |
Name |
Description |
System.Int32 |
r |
Red of RGBA.
|
System.Int32 |
g |
Green of RGBA.
|
System.Int32 |
b |
Blue of RGBA.
|
System.Int32 |
a |
Alpha of RGBA.
|
API Level: preview
Fields
View Source
Aqua
The Aqua is a predefined Color instance. It's RGB value is (0, 255, 255).
Declaration
public static readonly Color Aqua
Field Value
API Level: preview
View Source
Black
The Black is a predefined Color instance. It's RGB value is (0, 0, 0).
Declaration
public static readonly Color Black
Field Value
API Level: preview
View Source
Blue
The Blue is a predefined Color instance. It's RGB value is (0, 0, 255).
Declaration
public static readonly Color Blue
Field Value
API Level: preview
View Source
Fuchsia
The Fuchsia is a predefined Color instance. It's RGB value is (255, 0, 255).
Declaration
public static readonly Color Fuchsia
Field Value
API Level: preview
View Source
Gray
The Gray is a predefined Color instance. It's RGB value is (128, 128, 128).
Declaration
public static readonly Color Gray
Field Value
API Level: preview
View Source
Green
The Green is a predefined Color instance. It's RGB value is (0, 128, 0).
Declaration
public static readonly Color Green
Field Value
API Level: preview
View Source
Lime
The Lime is a predefined Color instance. It's RGB value is (0, 255, 0).
Declaration
public static readonly Color Lime
Field Value
API Level: preview
View Source
Maroon
The Maroon is a predefined Color instance. It's RGB value is (128, 0, 0).
Declaration
public static readonly Color Maroon
Field Value
API Level: preview
View Source
Navy
The Navy is a predefined Color instance. It's RGB value is (0, 0, 128).
Declaration
public static readonly Color Navy
Field Value
API Level: preview
View Source
Olive
The Olive is a predefined Color instance. It's RGB value is (128, 128, 0).
Declaration
public static readonly Color Olive
Field Value
API Level: preview
View Source
Orange
The Orange is a predefined Color instance. It's RGB value is (255, 165, 0).
Declaration
public static readonly Color Orange
Field Value
API Level: preview
View Source
Pink
The Pink is a predefined Color instance. It's RGB value is (255, 102, 255).
Declaration
public static readonly Color Pink
Field Value
API Level: preview
View Source
Purple
The Purple is a predefined Color instance. It's RGB value is (128, 0, 128).
Declaration
public static readonly Color Purple
Field Value
API Level: preview
View Source
Red
The Red is a predefined Color instance. It's RGB value is (255, 0, 0).
Declaration
public static readonly Color Red
Field Value
API Level: preview
View Source
Silver
The Silver is a predefined Color instance. It's RGB value is (192, 192, 192).
Declaration
public static readonly Color Silver
Field Value
API Level: preview
View Source
Teal
The Teal is a predefined Color instance. It's RGB value is (0, 128, 128).
Declaration
public static readonly Color Teal
Field Value
API Level: preview
View Source
Transparent
The Tansparent is a predefined Color instance. It's RGBA value is (0, 0, 0, 0).
Declaration
public static readonly Color Transparent
Field Value
API Level: preview
View Source
White
The White is a predefined Color instance. It's RGB value is (255, 255, 255).
Declaration
public static readonly Color White
Field Value
API Level: preview
View Source
Yellow
The Yellow is a predefined Color instance. It's RGB value is (255, 255, 0).
Declaration
public static readonly Color Yellow
Field Value
API Level: preview
Properties
View Source
A
Gets the A value of RGBA.
A means the Alpha in color.
Declaration
Property Value
Type |
Description |
System.Int32 |
|
API Level: preview
View Source
B
Gets the B value of RGBA.
B means the Blue in color.
Declaration
Property Value
Type |
Description |
System.Int32 |
|
API Level: preview
Declaration
public static Color Default { get; }
Property Value
API Level: preview
View Source
G
Gets the G value of RGBA.
G means the Green in color.
Declaration
Property Value
Type |
Description |
System.Int32 |
|
API Level: preview
View Source
IsDefault
Gets whether the Color instance's mode is default or not.
The return type is bool.
Declaration
public bool IsDefault { get; }
Property Value
Type |
Description |
System.Boolean |
|
API Level: preview
View Source
R
Gets the R value of RGBA.
R means the Red in color.
Declaration
Property Value
Type |
Description |
System.Int32 |
|
API Level: preview
Methods
View Source
Equals(Object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
The object to compare with the current instance.
|
Returns
Type |
Description |
System.Boolean |
true if the object and this instance are of the same type and represent the same value.
otherwise, false.
|
Overrides
System.ValueType.Equals(System.Object)
API Level: preview
View Source
FromHex(String)
Gets a Color instance with a hexadecimal string parameter.
Declaration
public static Color FromHex(string hex)
Parameters
Type |
Name |
Description |
System.String |
hex |
Hexadecimal string.
|
Returns
Type |
Description |
Color |
New instance of the Color struct.
|
API Level: preview
View Source
FromRgb(Int32, Int32, Int32)
Gets a Color instance with R,G,B parameters.
Declaration
public static Color FromRgb(int r, int g, int b)
Parameters
Type |
Name |
Description |
System.Int32 |
r |
Red of RGB.
|
System.Int32 |
g |
Green of RGB.
|
System.Int32 |
b |
Blue of RGB.
|
Returns
Type |
Description |
Color |
New instance of the Color struct.
|
API Level: preview
View Source
FromRgba(Int32, Int32, Int32, Int32)
Gets a Color instance with R,G,B,A parameters.
Declaration
public static Color FromRgba(int r, int g, int b, int a)
Parameters
Type |
Name |
Description |
System.Int32 |
r |
Red of RGBA.
|
System.Int32 |
g |
Green of RGBA.
|
System.Int32 |
b |
Blue of RGBA.
|
System.Int32 |
a |
Alpha of RGBA.
|
Returns
Type |
Description |
Color |
New instance of the Color struct.
|
API Level: preview
View Source
FromUint(UInt32)
Gets a Color instance with an unsigned integer parameter.
Declaration
public static Color FromUint(uint argb)
Parameters
Type |
Name |
Description |
System.UInt32 |
argb |
Unsigned integer indicates RGBA.
|
Returns
Type |
Description |
Color |
New instance of the Color struct.
|
API Level: preview
View Source
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
A 32-bit signed integer hash code.
|
Overrides
System.ValueType.GetHashCode()
API Level: preview
View Source
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
The fully qualified type name.
|
Overrides
System.ValueType.ToString()
API Level: preview
Operators
View Source
Equality(Color, Color)
Compares whether the two Color instances are same or not.
Declaration
public static bool operator ==(Color a, Color b)
Parameters
Type |
Name |
Description |
Color |
a |
A Color instance.
|
Color |
b |
A Color instance.
|
Returns
Type |
Description |
System.Boolean |
The result whether the two instances are the same or not.
Return type is bool. If they are same, return true.
|
API Level: preview
View Source
Inequality(Color, Color)
Compares whether the two Color instances are different or not.
Declaration
public static bool operator !=(Color a, Color b)
Parameters
Type |
Name |
Description |
Color |
a |
A Color instance.
|
Color |
b |
A Color instance.
|
Returns
Type |
Description |
System.Boolean |
The result whether the two instances are different or not.
Return type is bool. If they are different, return true.
|
API Level: preview