@rekurt/openkline - v0.2.0
    Preparing search index...

    Function withAlpha

    • 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.

      Parameters

      • color: string
      • alpha: number

      Returns string