CalGray and CalRGB Color Space Registration
The advanced color-space registrars of ISO 32000-1 8.6 build a shared indirect color-space array, register it in the document color-space registry and return the generated resource name for use with SetFillColorSpace and SetFillColor
THotPDF members
THotPDF.RegisterCalGrayColorSpace(WhitePointX, WhitePointY, WhitePointZ, Gamma, BlackPoint...) writes the ISO 32000-1 8.6.5.2 calibration dictionary [/CalGray << /WhitePoint /BlackPoint /Gamma >>] and returns a CG-prefixed resource name; invalid inputs return an empty string instead of raising
THotPDF.RegisterCalRGBColorSpace(WhitePoint..., GammaR, GammaG, GammaB, Matrix, BlackPoint...) writes the 8.6.5.3 dictionary with per-channel gamma and the optional nine-element calibrated-RGB-to-XYZ /Matrix, returning a CR-prefixed name
THotPDF.RegisterCalRGBSRGBColorSpace is the parameterless canonical CalRGB approximation of sRGB of ISO 32000-2 8.6.5.3 — D65 white point, 2.2 gammas and the ITU-R BT.709 primaries — for callers that want sRGB-like calibrated RGB without shipping an ICC profile
All three require PDF 1.2 or later and a current page; the render side accelerates the standard 2.2 and 1.8 gamma exponents with 4096-interval lookup tables
THotPDF.RegisterLabColorSpace follows the same pattern for CIE-based Lab