Transforms a rgb string into rgba values.

  • Parameters

    • rgbaStr: string

      A rgb or rgba color, starting with 'rgb' and including 3 or 4 (=including alpha) values.

    Returns null | [number, number, number, number]

    an array of rgba values: R, G, B [0-255] and alpha [0-1]. Or null if the rgb string is invalid.