6.0.1 • Published 4 years ago

@thebespokepixel/oco-colorvalue-ex v6.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

oco-colorvalue-ex

Extended color features for Open Color's core ColorValue object.

Publishing Status

npm Libraries.io
Travis Rollup

Development Status

Travis Libraries.io
Snyk Code-Climate Code-Climate Coverage

Documentation/Help

Inch.io 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.
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/

6.0.1

4 years ago

6.0.0

4 years ago

5.0.2

5 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.0.3

6 years ago

4.0.2

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

7 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago