Color.FromRgba

FromRgba(byte, byte, byte, byte)

Returns a new Color with the requested ged, green, blue, alpha values. All color components must be in the range 0-255.

public static Color FromRgba(byte red, byte green, byte blue, byte alpha)
ParameterTypeDescription
redByteA byte that represents the red component of the color.
greenByteA byte that represents the green component of the color.
blueByteA byte that represents the blue component of the color.
alphaByteA byte that represents the alpha component of the color.

Return Value

A new instance of the Color class

See Also


FromRgba(int, int, int, int)

Returns a new Color with the requested ged, green, blue, alpha values. All color components must be in the range 0-255.

public static Color FromRgba(int red, int green, int blue, int alpha)
ParameterTypeDescription
redInt32A int that represents the red component of the color.
greenInt32A int that represents the green component of the color.
blueInt32A int that represents the blue component of the color.
alphaInt32A int that represents the alpha component of the color.

Return Value

A new instance of the Color class

See Also


FromRgba(float, float, float, float)

Returns a new Color with the requested ged, green, blue, alpha values. All color components must be in the range 0-1.

public static Color FromRgba(float red, float green, float blue, float alpha)
ParameterTypeDescription
redSingleA float that represents the red component of the color.
greenSingleA float that represents the green component of the color.
blueSingleA float that represents the blue component of the color.
alphaSingleA float that represents the alpha component of the color.

Return Value

A new instance of the Color class

See Also