• Returns the converted rgb color from the given hex color

    Parameters

    • Optionalhex: string

      the hex color to inspect

    Returns string | undefined

    the converted rgb color from the given hex color

    hexToRgb('#fff');    // 'rgb(255, 255, 255)'
    hexToRgb('#ff0000'); // 'rgb(255, 0, 0)'