Search Results for

    Show / Hide Table of Contents

    Class ParsingTools

    Tools to parse RGB specifiers for general use

    Inheritance
    object
    ParsingTools
    Namespace: Terminaux.Colors.Models.Parsing
    Assembly: Terminaux.dll
    Syntax
    public static class ParsingTools

    Methods

    | Edit this page View Source

    IsSpecifierAndValueValid(string)

    Does the string specifier represent a valid model-agnostic specifier and contain valid values?

    Declaration
    public static bool IsSpecifierAndValueValid(string specifier)
    Parameters
    Type Name Description
    string specifier

    Specifier that represents a valid model-agnostic specifier and contains valid values

    Returns
    Type Description
    bool

    True if the specifier is valid; false otherwise.

    | Edit this page View Source

    IsSpecifierAndValueValidRgbHash(string)

    Does the string specifier represent a valid RGB hash (#RGB or #RRGGBB) as in HTML?

    Declaration
    public static bool IsSpecifierAndValueValidRgbHash(string specifier)
    Parameters
    Type Name Description
    string specifier

    Specifier that represents a valid RGB hash (#RGB or #RRGGBB) as in HTML

    Returns
    Type Description
    bool

    True if the specifier is valid; false otherwise.

    | Edit this page View Source

    IsSpecifierConsoleColors(string)

    Does the string specifier represent either a color name taken from ConsoleColors, a color number from 0 to 255, or a color code?

    Declaration
    public static bool IsSpecifierConsoleColors(string specifier)
    Parameters
    Type Name Description
    string specifier

    Specifier that represents either a color name taken from ConsoleColors, a color number from 0 to 255, or a color code

    Returns
    Type Description
    bool

    True if the specifier is valid; false otherwise.

    | Edit this page View Source

    IsSpecifierValid(string)

    Does the string specifier represent a valid model-agnostic specifier?

    Declaration
    public static bool IsSpecifierValid(string specifier)
    Parameters
    Type Name Description
    string specifier

    Specifier that represents a valid model-agnostic specifier

    Returns
    Type Description
    bool

    True if the specifier is valid; false otherwise.

    | Edit this page View Source

    IsSpecifierValidRgbHash(string)

    Does the string specifier represent a valid RGB hash (#RGB or #RRGGBB) as in HTML?

    Declaration
    public static bool IsSpecifierValidRgbHash(string specifier)
    Parameters
    Type Name Description
    string specifier

    Specifier that represents a valid RGB hash (#RGB or #RRGGBB) as in HTML

    Returns
    Type Description
    bool

    True if the specifier is valid; false otherwise.

    | Edit this page View Source

    ParseSpecifier(string, ColorSettings?)

    Parses the specifier and returns an instance of RedGreenBlue

    Declaration
    public static RedGreenBlue ParseSpecifier(string specifier, ColorSettings? settings = null)
    Parameters
    Type Name Description
    string specifier

    Specifier of RGB

    ColorSettings settings

    Settings to use. Use null for global settings

    Returns
    Type Description
    RedGreenBlue

    An instance of RedGreenBlue

    Exceptions
    Type Condition
    TerminauxException
    | Edit this page View Source

    ParseSpecifierRgbHash(string, ColorSettings?)

    Parses the hex representation of RGB and returns an instance of RedGreenBlue

    Declaration
    public static RedGreenBlue ParseSpecifierRgbHash(string specifier, ColorSettings? settings = null)
    Parameters
    Type Name Description
    string specifier

    Specifier of RGB in hex representation

    ColorSettings settings

    Settings to use. Use null for global settings

    Returns
    Type Description
    RedGreenBlue

    An instance of RedGreenBlue

    Exceptions
    Type Condition
    TerminauxException
    | Edit this page View Source

    ParseSpecifierRgbName(string, ColorSettings?)

    Parses the specifier that holds the color name and returns an instance of RedGreenBlue

    Declaration
    public static RedGreenBlue ParseSpecifierRgbName(string specifier, ColorSettings? settings = null)
    Parameters
    Type Name Description
    string specifier

    Color name defined in ConsoleColors

    ColorSettings settings

    Settings to use. Use null for global settings

    Returns
    Type Description
    RedGreenBlue

    An instance of RedGreenBlue

    Exceptions
    Type Condition
    TerminauxException
    | Edit this page View Source

    TryParseSpecifier(string, out RedGreenBlue?)

    Parses the specifier and returns an instance of RedGreenBlue

    Declaration
    public static bool TryParseSpecifier(string specifier, out RedGreenBlue? rgb)
    Parameters
    Type Name Description
    string specifier

    Specifier of RGB

    RedGreenBlue rgb

    Output for the RGB component for 256- and 16-color modes

    Returns
    Type Description
    bool

    An instance of RedGreenBlue

    Exceptions
    Type Condition
    TerminauxException
    | Edit this page View Source

    TryParseSpecifierRgbHash(string, out RedGreenBlue?)

    Parses the hex representation of RGB and returns an instance of RedGreenBlue

    Declaration
    public static bool TryParseSpecifierRgbHash(string specifier, out RedGreenBlue? output)
    Parameters
    Type Name Description
    string specifier

    Specifier of RGB in hex representation

    RedGreenBlue output

    Output for the RGB component

    Returns
    Type Description
    bool

    An instance of RedGreenBlue

    Exceptions
    Type Condition
    TerminauxException
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX