Add an alpha channel to an arbitrary CSS color string. Uses a tiny
Canvas2D hack: let the browser parse the color, then extract RGBA.
Returns rgba(r,g,b,a) regardless of input format (hex/rgb/rgba/named).
Exported so sibling renderers (e.g. BaselineRenderer) reuse one
implementation instead of duplicating the parser.
Add an alpha channel to an arbitrary CSS color string. Uses a tiny Canvas2D hack: let the browser parse the color, then extract RGBA. Returns
rgba(r,g,b,a)regardless of input format (hex/rgb/rgba/named).Exported so sibling renderers (e.g. BaselineRenderer) reuse one implementation instead of duplicating the parser.