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

33 lines
1.3 KiB
Markdown

# @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.
<!-- begin:auto-docs -->
## Documentation tree
- [cmyk](./src/cmyk/cmyk.md) — `cmyk.ts` provides bidirectional conversion between RGB and CMYK colour spaces. CMYK is the subtractive model used in p…
- [cmyk](./src/cmyk/cmyk.md) — `cmyk.ts` provides bidirectional conversion between RGB and CMYK colour spaces. CMYK is the subtractive model used in p…
<!-- end:auto-docs -->
## Installation
```bash
bun add @suaveplan/colour-convert-cmyk
```
## Quick Start
```ts
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
- [`src/cmyk/cmyk.md`](./src/cmyk/cmyk.md) — RGB↔CMYK conversion implementation and API reference