A small wrapper over the lymui library. The wrapper provide binding for the specified language below
Uses these commands
cbindgen --config cbindgen.toml --crate lymui-c --output my_header.h --lang c
cargo build
gcc rgb.c -o test -llymui_c -L../../target/debug
LD_LIBRARY_PATH=../../target/debug ./test
You’ll need to have NodeJS installed on your machine.
Go to the node-binding
folder and run the following command npm run build
. This is going to output a .node
file which you can use in your npm project
In a JS file file you can copy paste the following example.
const binding = require('../node-binding.node')
const res = binding.getAnyRgbCompatibleColor(
{ r: 5, g: 10, b: 100 },
binding.RgbMapping.Rgb,
binding.RgbMapping.Hex
)