1.0.6 • Published 3 years ago

super-color v1.0.6

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

Super Color

Small & Fast Color conversion library.

Installation

npm i super-color

Examples

import SuperColor from "super-color";

const superColor = new SuperColor("#f00");
console.log(superColor.toString()); // #f00

superColor.setFormat("hsl");
console.log(superColor.toString()); // hsl(0deg, 100%, 50%)

superColor.setFormat("rgb");
console.log(superColor.toString()); // rgb(255, 0, 0)

superColor.setAlpha(0.5);
console.log(superColor.toString()); // rgba(255, 0, 0, 0.5)

superColor.setHsv({ h: 100, v: 0.8 });
console.log(superColor.toString()); // rgba(67, 204, 0, 0.5)

superColor.setFormat("hex");
console.log(superColor.toString()); // #43CC0080

License

GPL licensed.

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago