Unosquare
    Show / Hide Table of Contents

    Class CameraColor

    A simple RGB color class to represent colors in RGB and YUV colorspaces.

    Inheritance
    Object
    CameraColor
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unosquare.RaspberryIO.Camera
    Syntax
    public class CameraColor

    Constructors

    CameraColor(Int32, Int32, Int32)

    Initializes a new instance of the CameraColor class.

    Declaration
    public CameraColor(int r, int g, int b)
    Parameters
    Type Name Description
    Int32 r

    The red.

    Int32 g

    The green.

    Int32 b

    The blue.

    CameraColor(Int32, Int32, Int32, String)

    Initializes a new instance of the CameraColor class.

    Declaration
    public CameraColor(int r, int g, int b, string name)
    Parameters
    Type Name Description
    Int32 r

    The red.

    Int32 g

    The green.

    Int32 b

    The blue.

    String name

    The well-known color name.

    Properties

    B

    Gets the blue byte.

    Declaration
    public byte B { get; }
    Property Value
    Type Description
    Byte

    Black

    Gets the predefined black color.

    Declaration
    public static CameraColor Black { get; }
    Property Value
    Type Description
    CameraColor

    Blue

    Gets the predefined blue color.

    Declaration
    public static CameraColor Blue { get; }
    Property Value
    Type Description
    CameraColor

    G

    Gets the green byte.

    Declaration
    public byte G { get; }
    Property Value
    Type Description
    Byte

    Green

    Gets the predefined green color.

    Declaration
    public static CameraColor Green { get; }
    Property Value
    Type Description
    CameraColor

    Name

    Gets the well-known color name.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String

    R

    Gets the red byte.

    Declaration
    public byte R { get; }
    Property Value
    Type Description
    Byte

    Red

    Gets the predefined red color.

    Declaration
    public static CameraColor Red { get; }
    Property Value
    Type Description
    CameraColor

    RGB

    Gets the RGB byte array (3 bytes).

    Declaration
    public byte[] RGB { get; }
    Property Value
    Type Description
    Byte[]

    White

    Gets the predefined white color.

    Declaration
    public static CameraColor White { get; }
    Property Value
    Type Description
    CameraColor

    YUV

    Gets the YUV byte array (3 bytes).

    Declaration
    public byte[] YUV { get; }
    Property Value
    Type Description
    Byte[]

    Methods

    ToRgbHex(Boolean)

    Returns a hexadecimal representation of the RGB byte array. Preceded by 0x and all in lowercase.

    Declaration
    public string ToRgbHex(bool reverse)
    Parameters
    Type Name Description
    Boolean reverse

    if set to true [reverse].

    Returns
    Type Description
    String

    A string.

    ToYuvHex(Boolean)

    Returns a hexadecimal representation of the YUV byte array. Preceded by 0x and all in lowercase.

    Declaration
    public string ToYuvHex(bool reverse)
    Parameters
    Type Name Description
    Boolean reverse

    if set to true [reverse].

    Returns
    Type Description
    String

    A string.

    Comments

    Back to top Copyright © 2017-2019 Unosquare