0.2.0 • Published 2 years ago

coloration-lib v0.2.0

Weekly downloads
5
License
MIT
Repository
-
Last release
2 years ago

npm version Downloads MIT license

Coloration

Installation

npm i coloration-lib --save
  • 0.1.3 : for View Engine
  • 0.2.0+ : for Ivy

Requirements

Only for demo:

  • Angular 13.3.0 and more

Demo

See a live demonstation

Usage

Examples

changeLuminosity

import { Coloration } from 'coloration-lib';

const color = new Coloration('red');
color.changeLuminosity(0.55);
console.log(color.toHEX()); // #ff8c8c

maskColor

const color = new Coloration('red');
color.maskColor('blue', 0.25);
console.log(color.toHEX()); // #bf0040

addColor

const color = new Coloration('red');
color.addColor({
    h: -23,
    v: 10,
    alpha: -0.2,
});
console.log(color.toHEX()); // #ff3381cc

Publishing the library

npm run build:lib
npm run publish:lib

Publishing the demo

npm run build:demo

License

This module is released under the permissive MIT license. Your contributions are always welcome.

0.2.0

2 years ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago