JavaScript Library To Manipulate And Convert Colors – kwulers

Category: Color , Javascript | March 30, 2018
Author:MarkRabey
Views Total:570 views
Official Page:Go to website
Last Update:March 30, 2018
License:MIT

Preview:

JavaScript Library To Manipulate And Convert Colors – kwulers

Description:

kwulers is a lightweight (~6kb minified) JavaScript color conversion library used to converts colors between RGB, RGBA, HEX, HSL, CMYK, and ColorName.

How to use it:

Installation:

# NPM
$ npm install kwulers --save

Import the kwulers.

import kwulers from 'kwulers';

Or directly include the compiled JavaScript ‘kwulers.min.js’ on the web page.

<script src="kwulers.min.js"></script>

The API methods to convert the colors you provide.

// generate CSS from RGB
getCSSFromRGB()
// generates CSS from RGBA
getCSSFromRGBA()  Array containing RGBA values  console.log(kwulers.getCSSFromRGBA([125,150,178,.75])); // rgba(125, 150, 178, 0.75)
// converts RGB to HEX
getHexFromRGB()
// converts Color Name to HEX
getHexFromName()
// converts RGBA to RGB
getRGBFromRGBA()
// converts HEX to RGB
getRGBFromHex()
// converts RGB to HSL
getHSLFromRGB()
// converts HSL to RGB
getRGBFromHSL()
// converts HEX to HSL
getHSLFromHex()
// converts HSL to HEX
getHexFromHSL()
// converts RGB to CMYK
getCMYKFromRGB()
// converts HEX to CMYK
getCMYKFromHex()

 

You Might Be Interested In:


Leave a Reply