Package Exports
- @thebespokepixel/palette2oco
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 (@thebespokepixel/palette2oco) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
palette2oco converter
Load or convert files or directories of various palette formats to structured Open Color data or .oco files.
Publishing Status
Development Status
Documentation/Help
Usage
Load structured palette data from various tools into Open Color format.
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)
})
Convert palette data from a variety of sources into Open Color .oco format.
Allows structured directories of pallette data to be converted into nested oco palette data.
Formats supported:
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)
}
...
]
}
Documentation
Full documentation can be found at https://thebespokepixel.github.io/palette2oco/