Function parseRgbString

  • Parses an RGB or RGBA string and returns an object with the red, green, blue, and optionally alpha components.

    Parameters

    • color: string

      The RGB or RGBA string to parse (e.g., "rgb(255, 255, 255)" or "rgba(255, 255, 255, 0.5)").

    Returns null | HexDecimalObject

    The RGB components or null if the input is invalid.