CalRgbColorSpace Constructor (String, Double, Double, Double, Double)

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET
Initializes a new instance of the CalGrayColorSpace class.

Namespace:  Apitron.PDF.Kit.FixedLayout.Resources.ColorSpaces.CIEBased
Assembly:  Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: (

public CalRgbColorSpace(
	string resourceID,
	double[] whitePoint,
	double[] blackPoint,
	double[] gamma,
	double[] matrix


Type: SystemString
The resource ID.
Type: SystemDouble
The white point is an array of three numbers [XW YW ZW] specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers XW and ZW shall be positive, and YW shall be equal to 1.0.
Type: SystemDouble
The black point is an array of three numbers [XB YB ZB] specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers shall be non-negative. Default value: [0.0 0.0 0.0].
Type: SystemDouble
The gamma is an array of three numbers [GR GG GB] specifying the gamma for the red, green, and blue (A, B, and C) components of the colour space. Default value: [1.0 1.0 1.0].
Type: SystemDouble
The matrix is an array of nine numbers [XA YA ZA XB YB ZB XC YC ZC] specifying the linear interpretation of the decoded A, B, and C components of the colour space with respect to the final XYZ representation. Default value: the identity matrix [1 0 0 0 1 0 0 0 1].

// register color space as a resource
document.ResourceManager.RegisterResource(new CalRgbColorSpace("CS_CALRGB", new double[] { 0.12, 1.0, 0.21 }, new double[] { 0.23, 0.54, 0.78 }, new double[] { 1.0, 1.0, 1.0 }, new double[] { 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 }));

// set color space
page.Content.SetNonStrokingColor(0.67, 0.99, 0.13);

// set color
page.Content.SetStrokingColor(0.4, 0.54, 0.65);
See Also