Files
skills/docs/media/image/colour-convert-cmyk
2026-05-29 08:20:56 +01:00
..
2026-05-29 08:20:56 +01:00
2026-05-29 08:20:56 +01:00

@suaveplan/colour-convert-cmyk - Bidirectional RGB <-> CMYK colour space conversion with black generation for print workflows

Bidirectional conversion between RGB and CMYK colour spaces using the standard Euclidean algorithm with black generation. CMYK is the subtractive model used in professional printing; these conversions are essential for print preview, pre-press workflows, and bridging screen colours with physical output.

Documentation tree

  • cmyk — cmyk.ts provides bidirectional conversion between RGB and CMYK colour spaces. CMYK is the subtractive model used in p…
    • cmyk — cmyk.ts provides bidirectional conversion between RGB and CMYK colour spaces. CMYK is the subtractive model used in p…

Installation

bun add @suaveplan/colour-convert-cmyk

Quick Start

import { rgbToCmyk, cmykToRgb } from "@suaveplan/colour-convert-cmyk";

const ink = rgbToCmyk({ r: 59, g: 130, b: 246 });
console.log(ink); // { c: 76, m: 47, y: 0, k: 4 }

const screen = cmykToRgb(ink);
console.log(screen); // { r: 59, g: 130, b: 246, a: 1 }

Modules