Click or drag to resize

PdfColorFromGray Method

Creates a new PdfColor structure in DeviceGray color space by using the specified gray value.

Namespace: SautinSoft.Pdf.Content
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2026.5.5
Syntax
public static PdfColor FromGray(
	double gray
)

Parameters

gray  Double
The gray value in range from 0 to 1.

Return Value

PdfColor
A new PdfColor structure in DeviceGray color space created by using the specified gray value.
Exceptions
ExceptionCondition
ArgumentExceptiongray is either NaN, NegativeInfinity or PositiveInfinity.
See Also