Class ColorNameManager

Manager to store and retrieve the names of colors based on their hex string value.

Constructors

Methods

  • Retrieves the name of the color represented by the given colorHex. If the colorHex string is not well formatted or the nearest color function encounters an error, the method will return undefined.

    Parameters

    • colorHex: string

      The hex string representation of the color whose name is being retrieved (format: #RRGGBB).

    Returns undefined | string

  • Does the given hex string already have a color name match?

    Parameters

    • hex: string

    Returns boolean

    true if the hex has a direct color name match in the manager, false if it does not.