What color format is pdf-lib using? Writing rgb(156, 132, 678)
or cmyk(157, 145, 124, 135)
throws an error where all number values must be between 0 and 1.
How do I convert standard rgb, ie. 0-255 to whatever format this is?
The docs give me the TypeScript definitions of the function but no explanations.
CodePudding user response:
Documentation gives an example like this color: rgb(0.95, 0.1, 0.1)
. Dividing by 255 is likely the solution.