High-performance color processing library for JavaScript & TypeScript. Transform, analyze, and generate colors with blazing speed.
npm install @CymbolTech/colorassemblyRGB, HSL, HSV, CMYK, LAB, LCH, OKLAB, OKLCH, XYZ, LMS and more with full bidirectional conversion.
WCAG 2.1 contrast checking, APCA contrast, and color blindness simulation built-in.
WebAssembly-powered core delivers near-native performance for color operations.
Generate harmonies, shades, tints, and complete semantic palettes for your designs.
Complete type definitions with full IntelliSense support for an amazing DX.
Pure Go compiled to WASM. No runtime dependencies, just pure performance.
Start working with colors in seconds
import { loadColorAssembly } from '@cymbol/colorassembly';
const api = await loadColorAssembly();
// Transform colors
const hsl = api.transforms.rgbToHsl({ r: 255, g: 128, b: 0 });
// { h: 30.12, s: 100, l: 50 }
// Check accessibility
const contrast = api.analyze.contrastRatio(
{ r: 0, g: 0, b: 0 },
{ r: 255, g: 255, b: 255 }
);
// 21 (perfect contrast)
// Generate harmonies
const triadic = api.generate.triadic({ r: 255, g: 0, b: 0 });
// [red, green, blue]
// Simulate color blindness
const protanopia = api.generate.simulateColorBlindness(
{ r: 255, g: 0, b: 0 },
'protanopia'
);Start using ColorAssembly in your project today.