Skip to content

Color.WithAlpha Method

Definition

Namespace: Brine2D.Core

Overloads
WithAlpha(byte) Returns a new color with the specified alpha value.
WithAlpha(float) Returns a new color with the specified alpha value.

Color.WithAlpha(byte) Method

Returns a new color with the specified alpha value.

public Brine2D.Core.Color WithAlpha(byte alpha);

Parameters

alpha System.Byte

New alpha value (0-255).

Returns

Color

Color.WithAlpha(float) Method

Returns a new color with the specified alpha value.

public Brine2D.Core.Color WithAlpha(float alpha);

Parameters

alpha System.Single

New alpha value (0.0-1.0).

Returns

Color