Function nameToColor

  • Retrieves the RGB color object corresponding to the provided color name from the color dictionary.

    Type Parameters

    • T extends string

    Parameters

    • name: T

      The name of the color to retrieve.

    • colors: Record<T, RGBColorObject> = HTML_COLOR_RECORD

      The dictionary containing color names and their corresponding RGB color objects.

    Returns Record<T, RGBColorObject>[T]

    The RGB color object corresponding to the provided color name, or undefined if the name is not found in the dictionary.

Generated using TypeDoc