Function hex2rgb

  • Converts a color from hex to rgb.

    Parameters

    • hex: string | number

      the color in hex format.

    Returns {
        b: number;
        g: number;
        r: number;
    }

    the color in rgb format.

    • b: number
    • g: number
    • r: number