Lymui-node is a small color conversion library for NodeJS


Keywords
color, conversion, async, converter, rgb, hsl, xyz, lch, luv, hsv, color-converter, color-conversion, colors, colors-library, convert-colors, n-api, node-addon, nodejs
License
MIT
Install
npm install lymui-node@1.2.0

Documentation

Lymui-node

Lymui-node is a small size color converter based on my Lymui C library. The library allow you to convert asynchronously colors.

The library support the following platforms:

  • Linux
  • OSX
  • Windows (through mingw)

Build Status N-API bade v3 Codacy Badge

Version

1.2.0

Getting start

Install

The library is a native addons. Firstable let's install node-gyp

npm install node-gyp

When you have install the node-gyp you can then install the library

npm install lymui-node

Example of usage

The API is pretty simple below is an example

const lib = require('lymui-node');

const hsl = lib.fromRGB({
  input: {
    r: 100,
    g: 200,
    b: 200
  },
  output: 'hsl',
  clamp: 100
})
.then(res => console.log(res))
.catch(err => console.log(err))

For more examples please take a look at the docs: Lymui-node docs

Test it locally

Test it locally should be easy. Please follow the steps below:

  • Run npm install (This will import lymui lib for the target os)
  • Run npm test (this run the JS test files)

Bindings

The bindings to the lymui library is located on the src folder.

Contribute

Feel free to contribute :) Fork it and do whatever you want

Changelog

The changelog is available over here