共用方式為


ColorExtensions.WithAlpha(Color, Int32) 方法

定義

根據這個色彩建立新的色彩,但使用新的 Alpha (0-255) 。

public static System.Drawing.Color WithAlpha (this System.Drawing.Color color, int alpha);

參數

color
System.Drawing.Color

做為基底使用的色彩。

alpha
System.Int32

要設定 0-255 的 Alpha。

傳回

System.Drawing.Color

新的色彩。

適用於