wi-palettify

1.0.3 • Public • Published

palettify

Convert Palette files to RGBa json

Install

NPM:

npm install -g wi-palettify

Yarn

yarn add --save wi-palettify

Usage

const palettify = require('wi-palettify')
const path = require('path')
 
var dir = process.cwd();
palettify.extractToFile(path.join(dir, '/Palette/Earth.pal'), 'D://tmp/palette1.json', (err) => {
    if (err) {
        console.log(err);
    }
})
 
palettify.extractToFile(path.join(dir, '/Palette'), 'D://tmp/palette2.json', (err) => {
    if (err) {
        console.log(err);
    }
});
 
palettify.extractRaw(path.join(dir, '/Palette/Blue.pal'), (err, ret) => {
    if (err) {
        console.log(err);
    }else{
        console.log(ret);
    }
});

CLI

From the command line, cd to your chrome app folder and do:

palettify [options]

Options:

short full description
-h --help output usage information
-V --version output the version number
-r --require [input] A palette file or folder
-o --outfile [outfile] Write the data to this file

Readme

Keywords

Package Sidebar

Install

npm i wi-palettify

Weekly Downloads

1

Version

1.0.3

License

ISC

Last publish

Collaborators

  • cuongurus