@OPEN-KAPPA/COLORS
    Preparing search index...

    Class HexAbstract

    Classic hex string related methods. Hex strings are in format: #... with a variable length deoending on the accuracy.

    Index

    Methods

    • Parse a hex string.

      Parameters

      • hex: string

        The hex string.

      Returns Rgb

      The parsed color.

      If the parsing fails.

    • CHech whether a string is a valid hex string.

      Parameters

      • hex: string

        The string to check.

      Returns boolean

      True if the hex string is valid.

    • Convert a color to a hex string. Format: #XXXXYYYYZZZZ.

      Parameters

      • color: Rgb

        The color to map.

      Returns string

      The hex string.

    • Convert a color to a hex string. Format: #XXXXYYYYZZZZAAAA.

      Parameters

      • color: Rgb

        The color to map.

      Returns string

      The hex string.

    • Convert a color to a hex string. Format: #XYZ.

      Parameters

      • color: Rgb

        The color to map.

      Returns string

      The hex string.

    • Convert a color to a hex string. Format: #XYZA.

      Parameters

      • color: Rgb

        The color to map.

      Returns string

      The hex string.

    • Convert a color to a hex string. Format: #XXYYZZ.

      Parameters

      • color: Rgb

        The color to map.

      Returns string

      The hex string.

    • Convert a color to a hex string. Format: #XXYYZZAA.

      Parameters

      • color: Rgb

        The color to map.

      Returns string

      The hex string.