2.2 KiB
tint
Tint the image using the provided chroma while preserving the image luminance. An alpha channel may be present and will be unchanged by the operation.
Parameters
-
rgb(String | Object) parsed by the color module to extract chroma values. -
Throws Error Invalid parameter
Returns Sharp
greyscale
Convert to 8-bit greyscale; 256 shades of grey.
This is a linear operation. If the input image is in a non-linear colour space such as sRGB, use gamma() with greyscale() for the best results.
By default the output image will be web-friendly sRGB and contain three (identical) color channels.
This may be overridden by other sharp operations such as toColourspace('b-w'),
which will produce an output image containing one color channel.
An alpha channel may be present, and will be unchanged by the operation.
Parameters
greyscaleBoolean (optional, defaulttrue)
Returns Sharp
grayscale
Alternative spelling of greyscale.
Parameters
grayscaleBoolean (optional, defaulttrue)
Returns Sharp
toColourspace
Set the output colourspace. By default output image will be web-friendly sRGB, with additional channels interpreted as alpha channels.
Parameters
-
colourspaceString? output colourspace e.g.srgb,rgb,cmyk,lab,b-w... -
Throws Error Invalid parameters
Returns Sharp
toColorspace
Alternative spelling of toColourspace.
Parameters
Returns Sharp