To ease implementing advanced color interfaces, you may rely on the engine to perform color conversions.
Converts a color to the given color space.
color
: The color to convert.colorSpace
: The color space to convert to.- Returns The converted color.
// Convert a colorconst color = engine.block.getStrokeColor(block);const cmykColor = engine.editor.convertColorToColorSpace(color, 'CMYK');