vis-util
    Preparing search index...

    Function overrideOpacity

    • This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.

      Parameters

      • color: string

        The color string (hex, RGB, RGBA).

      • opacity: number

        The new opacity.

      Returns string

      RGBA string, for example 'rgba(255, 0, 127, 0.3)'.