• The colour with its alpha replaced, written as a token value: #rrggbb when opaque, otherwise rgba() with the alpha clamped and rounded. Deliberately not the base package's withAlpha, which feeds canvas and always writes rgba() with the alpha as given; callers of each rely on its output.

    Parameters

    • color: string
    • alpha: number

    Returns string