public static function opacity2Alpha($opacity): int
    {
        $opacity = self::opacity($opacity);
        $opacity /= 100;

        $alpha = 127 - (127 * $opacity);
        $alpha = self::alpha($alpha);

        return $alpha;
    }
public static function opacity2Alpha($opacity): int
    {
        $opacity = self::opacity($opacity);
        $opacity /= 100;

        $alpha = 127 - (127 * $opacity);
        $alpha = self::alpha($alpha);

        return $alpha;
    }
public static function opacity2Alpha ( $ opacity ) : int { $ opacity = self :: opacity ( $ opacity ) ; $ opacity /= 100 ; $ alpha = 127 - ( 127 * $ opacity ) ; $ alpha = self :: alpha ( $ alpha ) ; return $ alpha ; }
Convert opacity value to alpha

@param int $opacity
@return int
Convert opacity value to alpha