Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
public class Color : Disposable, IDisposable, ICloneable
- Inheritance
-
- Implements
-
System.IDisposable
System.ICloneable
Constructors
Declaration
API Level: 3
Declaration
public Color(float r, float g, float b, float a)
Parameters
Type |
Name |
Description |
System.Single |
r |
The red component.
|
System.Single |
g |
The green component.
|
System.Single |
b |
The blue component.
|
System.Single |
a |
The alpha component.
|
API Level: 3
View Source
Color(Single[])
The conversion constructor from an array of four floats.
Declaration
public Color(float[] array)
Parameters
Type |
Name |
Description |
System.Single[] |
array |
array Array of R,G,B,A.
|
API Level: 3
Fields
Declaration
public static readonly Color Black
Field Value
API Level: 3
Declaration
public static readonly Color Blue
Field Value
API Level: 3
Declaration
public static readonly Color Cyan
Field Value
API Level: 3
Declaration
public static readonly Color Green
Field Value
API Level: 3
View Source
Magenta
Gets the magenta colored Color class.
Declaration
public static readonly Color Magenta
Field Value
API Level: 3
Declaration
public static readonly Color Red
Field Value
API Level: 3
View Source
Transparent
Gets the transparent colored Color class.
Declaration
public static readonly Color Transparent
Field Value
API Level: 3
Declaration
public static readonly Color White
Field Value
API Level: 3
View Source
Yellow
Gets the yellow colored Color class.
Declaration
public static readonly Color Yellow
Field Value
API Level: 3
Properties
Declaration
public float A
{
get;
[Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")]
set;
}
Property Value
Type |
Description |
System.Single |
|
API Level: 3
Declaration
public float B
{
get;
[Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")]
set;
}
Property Value
Type |
Description |
System.Single |
|
API Level: 3
Declaration
public float G
{
get;
[Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")]
set;
}
Property Value
Type |
Description |
System.Single |
|
API Level: 3
View Source
Item[UInt32]
The array subscript operator overload.
Declaration
public float this[uint index] { get; }
Parameters
Type |
Name |
Description |
System.UInt32 |
index |
The subscript index.
|
Property Value
Type |
Description |
System.Single |
The float at the given index.
|
API Level: 3
Declaration
public float R
{
get;
[Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")]
set;
}
Property Value
Type |
Description |
System.Single |
|
API Level: 3
Methods
View Source
EqualTo(Color)
Checks if two color classes are same.
Declaration
public bool EqualTo(Color rhs)
Parameters
Type |
Name |
Description |
Color |
rhs |
A color to be compared.
|
Returns
Type |
Description |
Boolean |
If two colors are are same, then true.
|
API Level: 3
View Source
NotEqualTo(Color)
Checks if two color classes are different.
Declaration
public bool NotEqualTo(Color rhs)
Parameters
Type |
Name |
Description |
Color |
rhs |
A color to be compared.
|
Returns
Type |
Description |
Boolean |
If two colors are are different, then true.
|
API Level: 3
Operators
Declaration
public static Color operator +(Color arg1, Color arg2)
Parameters
Type |
Name |
Description |
Color |
arg1 |
The first value.
|
Color |
arg2 |
The second value.
|
Returns
Type |
Description |
Color |
The color containing the result of the addition.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Thrown when arg1 is null.
|
API Level: 3
Declaration
public static Color operator /(Color arg1, float arg2)
Parameters
Type |
Name |
Description |
Color |
arg1 |
The first value.
|
System.Single |
arg2 |
The second value.
|
Returns
Type |
Description |
Color |
The color containing the result of the division.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Thrown when arg1 is null.
|
API Level: 3
Declaration
public static Color operator /(Color arg1, Color arg2)
Parameters
Type |
Name |
Description |
Color |
arg1 |
The first value.
|
Color |
arg2 |
The second value.
|
Returns
Type |
Description |
Color |
The color containing the result of the division.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Thrown when arg1 is null.
|
API Level: 3
View Source
Implicit(Color to Vector4)
Converts the Color class to Vector4 class implicitly.
Declaration
public static implicit operator Vector4(Color color)
Parameters
Type |
Name |
Description |
Color |
color |
A color to be converted to Vector4
|
Returns
API Level: 3
View Source
Implicit(Vector4 to Color)
Converts Vector4 class to Color class implicitly.
Declaration
public static implicit operator Color(Vector4 vec)
Parameters
Type |
Name |
Description |
Vector4 |
vec |
A Vector4 to be converted to color.
|
Returns
API Level: 3
View Source
Multiply(Color, Single)
The multiplication operator.
Declaration
public static Color operator *(Color arg1, float arg2)
Parameters
Type |
Name |
Description |
Color |
arg1 |
The first value.
|
System.Single |
arg2 |
The second value.
|
Returns
Type |
Description |
Color |
The color containing the result of the multiplication.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Thrown when arg1 is null.
|
API Level: 3
View Source
Multiply(Color, Color)
The multiplication operator.
Declaration
public static Color operator *(Color arg1, Color arg2)
Parameters
Type |
Name |
Description |
Color |
arg1 |
The first value.
|
Color |
arg2 |
The second value.
|
Returns
Type |
Description |
Color |
The color containing the result of the multiplication.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Thrown when arg1 is null.
|
API Level: 3
View Source
Subtraction(Color, Color)
The subtraction operator.
Declaration
public static Color operator -(Color arg1, Color arg2)
Parameters
Type |
Name |
Description |
Color |
arg1 |
The first value.
|
Color |
arg2 |
The second value.
|
Returns
Type |
Description |
Color |
The color containing the result of the subtraction.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Thrown when arg1 is null.
|
API Level: 3
View Source
UnaryNegation(Color)
The unary negation operator.
Declaration
public static Color operator -(Color arg1)
Parameters
Type |
Name |
Description |
Color |
arg1 |
The target value.
|
Returns
Type |
Description |
Color |
The color containg the negation.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Thrown when arg1 is null.
|
API Level: 3
Implements
System.IDisposable
System.ICloneable