kolora
v1.0.0
Published
A lightweight, dependency-free library for color conversion between various formats such as RGBA, HEX, HSL, HSV, and CMYK.
Downloads
13
Maintainers
Readme
Kolora
Kolora is a lightweight, dependency-free library for color conversion between various formats such as RGBA, HEX, HSL. Ideal for developers, designers, and color enthusiasts looking to effortlessly translate color codes across different color spaces.
Usage
import { toHex } from 'kolora';
const rgba = [255, 100, 100, 0.5];
const hex = toHex(rgba); // Returns '#ff646480'
import { hexToHsl } from 'kolora';
const hex = '#ff6464';
const hsl = hexToHsl(hex); // Returns [0, 100, 70]
Supported Conversions
- RGBA to HEX
- HEX to RGBA
- HEX to HSL
- HSL to HSV