ColorFFromGray Method

Creates a ColorF structure representing a grayscale color of the specified brightness.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
C#
public static ColorF FromGray(
	float brightness
)

Parameters

brightness  Single
The brightness of the gray color to be created where 0 represents the black color and 1 represents the white color. The parameter is not validated, but you can use the <see cref="IsValid"/> property or the <see cref="Clip">Clip</see> method on the created result.

Return Value

ColorF
A ColorF structure representing a grayscale color of the specified brightness.

See Also