New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

opencolor

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencolor

A collection of functions to parse Open Color files, construct them via code and write them

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
74
-30.84%
Maintainers
1
Weekly downloads
 
Created
Source

Open Color Library

A node module to parse, render and interpret Open Color Format.

Build Status: Build Status

js-standard-style

Install

npm install opencolor

Examples

Parsing and rendering OCO formats.

var oco = require('opencolor');

var tree = oco.parse(string); // gives you a tree of the parsed OCO data

var out = oco.render(tree); // outputs a valid oco file of the tree

Creating OCO programmatically

var oco = require('opencolor');

 // creates a root object
var tree = new oco.Entry();

// create a named color from a hex color
var color = new oco.Entry('super color', [oco.ColorValue.fromColorValue('#ff0')], 'Color');
var group = new oco.Entry('group', [color]);
// set some metadata on the group
group.addMetadata({'author/name': 'Jan Krutisch'});
tree.addChild(group);

var out = oco.render(tree); // outputs a valid oco file of the tree

We're going to add more thorough Documentation soon!

Development

git clone https://github.com/opencolor-tools/opencolor-js.git
npm install
npm run test:watch

Keywords

colors

FAQs

Package last updated on 22 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts