hcolor
TypeScript icon, indicating that this package has built-in type declarations

0.4.1 • Public • Published

hcolor

Simple color conversions.

Support

  • RGB
  • RGBA
  • HSL
  • HSLA
  • HEX

Example

const rgba = new HColor.RGBA(65, 43, 21, .5);
rgba.toHSLA().toString(true); // hsla(30,51%,17%,0.5)

HColor.HEX2HSLA('#135', .5, true); // hsla(210,67%,20%,0.5)

const hsl = HColor.rgb(12, 34, 56).toHSL(true);
hsl.toString(); // hsl(210,65%,13%)

HColor.parse('#F00').toString(); // rgb(255,0,0)

APIs

Please read the declaration files in typings or the source files in src to learn the APIs.

Changelog

See CHANGELOG.md

Package Sidebar

Install

npm i hcolor

Weekly Downloads

0

Version

0.4.1

License

MIT

Unpacked Size

60.5 kB

Total Files

15

Last publish

Collaborators

  • 3h