https://github.com/thebespokepixel/oco-colorvalue-ex
Extended color features for Open Color's core ColorValue object.
https://github.com/thebespokepixel/oco-colorvalue-ex
color colorvalue helper node-module npm open-color
Last synced: about 1 month ago
JSON representation
Extended color features for Open Color's core ColorValue object.
- Host: GitHub
- URL: https://github.com/thebespokepixel/oco-colorvalue-ex
- Owner: thebespokepixel
- License: mit
- Created: 2016-09-24T09:23:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-07T23:10:01.000Z (7 months ago)
- Last Synced: 2025-04-30T21:07:04.157Z (about 1 month ago)
- Topics: color, colorvalue, helper, node-module, npm, open-color
- Language: JavaScript
- Size: 26.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# oco-colorvalue-ex
> Extended color features for Open Color's core ColorValue object.
##### Publishing Status
[](https://www.npmjs.com/package/@thebespokepixel/oco-colorvalue-ex "npm") [](https://libraries.io/github/thebespokepixel/oco-colorvalue-ex "Libraries.io")
[](https://travis-ci.com/thebespokepixel/oco-colorvalue-ex "Travis") [](https://github.com/rollup/rollup/wiki/pkg.module "Rollup")##### Development Status
[](https://travis-ci.com/thebespokepixel/oco-colorvalue-ex "Travis") [](https://libraries.io/github/thebespokepixel/oco-colorvalue-ex "Libraries.io")
[](https://snyk.io/test/github/thebespokepixel/oco-colorvalue-ex "Snyk") [](https://codeclimate.com/github/thebespokepixel/oco-colorvalue-ex/maintainability "Code-Climate") [](https://codeclimate.com/github/thebespokepixel/oco-colorvalue-ex/test_coverage "Code-Climate Coverage")##### Documentation/Help
[](https://inch-ci.org/github/thebespokepixel/oco-colorvalue-ex "Inch.io") [](https://twitter.com/thebespokepixel "Twitter")
## Usage
#### Open Color's ColorValue object - Extended
Enables a much wider range of color spaces, conversion, and esoteric customisation in the server, build tool or preprocessor. Supports:
- Handling a wider range or color notations, such as those found in JSON and native Objects and Arrays.
- Uses my port of Tinycolor, es-tinycolor for tighter control of minimisation and tree-shaking.
- Add supports for L*ab, CMYK, RGBA Bytes
- Generate aesthetic palettes, or describe dynamic scaling along curves from oco files with Chroma support.```js
import {OCOValueEX, fromPrecise, fromBytes} from '@thebespokepixel/oco-colorvalue-ex'
import {render} from 'opencolor'const r = new OCOValueEX('red', 'Test Red')
const g = new OCOValueEX('green', 'Test Green')
const b = new OCOValueEX('blue', 'Test Blue')const ocoDocument = render(OCOValueEX.generateOCO('root', [r, g, b]))
/*
Test Red: rgb(255, 0, 0)
Test Green: rgb(0, 128, 0)
Test Blue: rgb(0, 0, 255)\n
*/
````## Documentation
Full documentation can be found at [https://thebespokepixel.github.io/oco-colorvalue-ex/][1][1]: https://thebespokepixel.github.io/oco-colorvalue-ex/