Skip to content

modern-pdf-lib


modern-pdf-lib / grayscale

Function: grayscale()

grayscale(gray): GrayscaleColor

Defined in: src/core/operators/color.ts:78

Create a grayscale colour.

Parameters

gray

number

Gray level [0, 1] where 0 = black, 1 = white.

Returns

GrayscaleColor

Released under the MIT License.