Color.FromRgb

FromRgb(byte, byte, byte)

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

public static Color FromRgb(byte red, byte green, byte blue)
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.

Return Value

A new instance of the Color class

See Also


FromRgb(int, int, int)

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

public static Color FromRgb(int red, int green, int blue)
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.

Return Value

A new instance of the Color class

See Also


FromRgb(float, float, float)

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

public static Color FromRgb(float red, float green, float blue)
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.

Return Value

A new instance of the Color class

See Also