import {paletteReader, paletteWriter, oco2Object, oco2Vars} from 'palette2oco'
paletteReader(pathRoot).load(pathArray)
.then(palette => palette.render(ocoPath))
.then(oco => paletteWriter(destinationFile, oco))
.catch(err => {
console.error(err)
})
Allows structured directories of pallette data to be converted into nested oco palette data.
Sip (http://sipapp.io): Supports .sippalette and .json exports.
Abobe Swatch Exchange (ASE): Full support of RGB, CMYK and Lab colorspaces.
Vanilla JSON: File signature must match the following...
{
"name" : "Palette name",
"colors" : [
{
name: "Color name",
red: (0.0 - 1.0 | 0 - 255)
green: (0.0 - 1.0 | 0 - 255)
blue: (0.0 - 1.0 | 0 - 255)
alpha: (0.0 - 1.0 | 0 - 255)
}
...
]
}
Read source data from an array of paths and return a Reader instance.
Reader
:
The Reader instance.
Write an Open Color format palette to the destination.
(string)
The destination path.
(OpenColor)
The Open Color palette data.
Promise
:
A promise that resoves when file is saved.