Struct Color

    Definition

    Namespace:
    ElmSharp
    Assembly:
    ElmSharp.dll

    The Color is a struct to record the check's state.

    [Obsolete("This has been deprecated in API12")]
    public struct Color

    Constructors

    View Source

    Color(int, int, int, int)

    Creates and initializes a new instance of the Color class with RGBA parameters.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public Color(int r, int g, int b, int a)
    Parameters
    Type Name Description
    int r

    Red of RGBA.

    int g

    Green of RGBA.

    int b

    Blue of RGBA.

    int a

    Alpha of RGBA.

    View Source

    Color(int, int, int)

    Creates and initializes a new instance of the Color class with RGB parameters.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public Color(int r, int g, int b)
    Parameters
    Type Name Description
    int r

    Red of RGB.

    int g

    Green of RGB.

    int b

    Blue of RGB.

    Fields

    View Source

    Aqua

    The Aqua is a predefined Color instance. It's RGB value is (0, 255, 255).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Aqua
    Field Value
    Type Description
    Color
    View Source

    Black

    The Black is a predefined Color instance. It's RGB value is (0, 0, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Black
    Field Value
    Type Description
    Color
    View Source

    Blue

    The Blue is a predefined Color instance. It's RGB value is (0, 0, 255).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Blue
    Field Value
    Type Description
    Color
    View Source

    Fuchsia

    The Fuchsia is a predefined Color instance. It's RGB value is (255, 0, 255).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Fuchsia
    Field Value
    Type Description
    Color
    View Source

    Gray

    The Gray is a predefined Color instance. It's RGB value is (128, 128, 128).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Gray
    Field Value
    Type Description
    Color
    View Source

    Green

    The Green is a predefined Color instance. It's RGB value is (0, 128, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Green
    Field Value
    Type Description
    Color
    View Source

    Lime

    The Lime is a predefined Color instance. It's RGB value is (0, 255, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Lime
    Field Value
    Type Description
    Color
    View Source

    Maroon

    The Maroon is a predefined Color instance. It's RGB value is (128, 0, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Maroon
    Field Value
    Type Description
    Color
    View Source

    Navy

    The Navy is a predefined Color instance. It's RGB value is (0, 0, 128).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Navy
    Field Value
    Type Description
    Color
    View Source

    Olive

    The Olive is a predefined Color instance. It's RGB value is (128, 128, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Olive
    Field Value
    Type Description
    Color
    View Source

    Orange

    The Orange is a predefined Color instance. It's RGB value is (255, 165, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Orange
    Field Value
    Type Description
    Color
    View Source

    Pink

    The Pink is a predefined Color instance. It's RGB value is (255, 102, 255).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Pink
    Field Value
    Type Description
    Color
    View Source

    Purple

    The Purple is a predefined Color instance. It's RGB value is (128, 0, 128).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Purple
    Field Value
    Type Description
    Color
    View Source

    Red

    The Red is a predefined Color instance. It's RGB value is (255, 0, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Red
    Field Value
    Type Description
    Color
    View Source

    Silver

    The Silver is a predefined Color instance. It's RGB value is (192, 192, 192).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Silver
    Field Value
    Type Description
    Color
    View Source

    Teal

    The Teal is a predefined Color instance. It's RGB value is (0, 128, 128).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Teal
    Field Value
    Type Description
    Color
    View Source

    Transparent

    The Tansparent is a predefined Color instance. It's RGBA value is (0, 0, 0, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Transparent
    Field Value
    Type Description
    Color
    View Source

    White

    The White is a predefined Color instance. It's RGB value is (255, 255, 255).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color White
    Field Value
    Type Description
    Color
    View Source

    Yellow

    The Yellow is a predefined Color instance. It's RGB value is (255, 255, 0).

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static readonly Color Yellow
    Field Value
    Type Description
    Color

    Properties

    View Source

    A

    Gets the A value of RGBA. A means the Alpha in color.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public int A { get; }
    Property Value
    Type Description
    int
    View Source

    B

    Gets the B value of RGBA. B means the Blue in color.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public int B { get; }
    Property Value
    Type Description
    int
    View Source

    Default

    Gets a default Color instance.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static Color Default { get; }
    Property Value
    Type Description
    Color
    Remarks

    In the default Color instance, the mode type is default with RGBA all set as -1.

    View Source

    G

    Gets the G value of RGBA. G means the Green in color.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public int G { get; }
    Property Value
    Type Description
    int
    View Source

    IsDefault

    Gets whether the Color instance's mode is default or not. The return type is bool.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool IsDefault { get; }
    Property Value
    Type Description
    bool
    View Source

    R

    Gets the R value of RGBA. R means the Red in color.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public int R { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    Equals(object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if the object and this instance are of the same type and represent the same value. otherwise, false.

    Overrides
    System.ValueType.Equals(object)
    View Source

    FromHex(string)

    Gets a Color instance with a hexadecimal string parameter.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static Color FromHex(string hex)
    Parameters
    Type Name Description
    string hex

    Hexadecimal string.

    Returns
    Type Description
    Color

    New instance of the Color struct.

    View Source

    FromRgb(int, int, int)

    Gets a Color instance with R,G,B parameters.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static Color FromRgb(int r, int g, int b)
    Parameters
    Type Name Description
    int r

    Red of RGB.

    int g

    Green of RGB.

    int b

    Blue of RGB.

    Returns
    Type Description
    Color

    New instance of the Color struct.

    View Source

    FromRgba(int, int, int, int)

    Gets a Color instance with R,G,B,A parameters.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static Color FromRgba(int r, int g, int b, int a)
    Parameters
    Type Name Description
    int r

    Red of RGBA.

    int g

    Green of RGBA.

    int b

    Blue of RGBA.

    int a

    Alpha of RGBA.

    Returns
    Type Description
    Color

    New instance of the Color struct.

    View Source

    FromUint(uint)

    Gets a Color instance with an unsigned integer parameter.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public static Color FromUint(uint argb)
    Parameters
    Type Name Description
    uint argb

    Unsigned integer indicates RGBA.

    Returns
    Type Description
    Color

    New instance of the Color struct.

    View Source

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public override int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer hash code.

    Overrides
    System.ValueType.GetHashCode()
    View Source

    ToString()

    Returns the fully qualified type name of this instance.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public override string ToString()
    Returns
    Type Description
    string

    The fully qualified type name.

    Overrides
    System.ValueType.ToString()

    Operators

    View Source

    operator ==(Color, Color)

    Compares whether the two Color instances are same or not.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    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
    bool

    The result whether the two instances are the same or not. Return type is bool. If they are same, return true.

    View Source

    operator !=(Color, Color)

    Compares whether the two Color instances are different or not.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    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
    bool

    The result whether the two instances are different or not. Return type is bool. If they are different, return true.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX