Click or drag to resize

PdfColorFromRgb Method

Creates a new PdfColor structure in DeviceRGB color space by using the specified red, green and blue values.

Namespace: SautinSoft.Pdf.Content
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2026.5.5
Syntax
public static PdfColor FromRgb(
	double red,
	double green,
	double blue
)

Parameters

red  Double
The red value in range from 0 to 1.
green  Double
The green value in range from 0 to 1.
blue  Double
The blue value in range from 0 to 1.

Return Value

PdfColor
A new PdfColor structure in DeviceRGB color space created by using the specified red, green and blue values.
Exceptions
ExceptionCondition
ArgumentExceptionred, green, or blue is either NaN, NegativeInfinity or PositiveInfinity.
See Also