JSPM

kolora

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 6
    • Score
      100M100P100Q36737F
    • License MIT

    A lightweight, dependency-free library for color conversion between various formats such as RGBA, HEX, HSL, HSV, and CMYK.

    Package Exports

    • kolora
    • kolora/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (kolora) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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