Comparing version 6.0.2-alpha.1 to 6.0.2-alpha.2
@@ -5,7 +5,7 @@ { | ||
"keywords": ["color", "color space", "CIE", "RGB", "HUSL", "HSL"], | ||
"version": "6.0.2-alpha.1", | ||
"version": "6.0.2-alpha.2", | ||
"author": "Alexei Boronine <alexei@boronine.com>", | ||
"license": "MIT", | ||
"main": "../dist/husl.min.js", | ||
"files": ["../dist/husl.min.js"], | ||
"main": "dist/husl.min.js", | ||
"files": ["dist/husl.min.js"], | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type" : "git", |
@@ -1,50 +0,29 @@ | ||
# HUSL - JavaScript implementation | ||
[![Build Status](https://travis-ci.org/husl-colors/husl.svg?branch=master)](https://travis-ci.org/husl-colors/husl) | ||
[![NPM package](https://img.shields.io/npm/v/husl.svg)](https://www.npmjs.com/package/husl) | ||
## Installation | ||
# HUSL - Human-friendly HSL | ||
Client-side: download the latest husl.min.js from the | ||
[releases page](https://github.com/husl-colors/husl/releases). | ||
Once this module is loaded in the browser, you can access it via the | ||
global ``window.HUSL``. | ||
[Explanation, demo, ports etc.](http://www.husl-colors.org) | ||
Server-side: ``npm install husl``. | ||
The reference implementation is [written in Haxe](https://github.com/husl-colors/husl/tree/master/haxe). | ||
## Usage | ||
## Building | ||
**husl.toHex(hue, saturation, lightness)** | ||
Requirements: GNU Make, Haxe 3, JDK 7+. | ||
*hue* is a number between 0 and 360, *saturation* and *lightness* are | ||
numbers between 0 and 100. This function returns the resulting color as | ||
a hex string. | ||
To build the JavaScript version: | ||
**husl.toRGB(hue, saturation, lightness)** | ||
```sh | ||
make bin/husl.min.js | ||
``` | ||
Like above, but returns an array of 3 numbers between 0 and 1, for the | ||
r, g, and b channel. | ||
To build Haxe documentation: | ||
**husl.fromHex(hex)** | ||
```sh | ||
make dist/doc | ||
``` | ||
Takes a hex string and returns the HUSL color as array that contains | ||
the hue (0-360), saturation(0-100) and lightness(0-100) channel. | ||
_Note_: The result can have rounding errors. For example saturation can | ||
be 100.00000000000007 | ||
## Versioning | ||
**husl.fromRGB(red, green, blue)** | ||
Like above, but *red*, *green* and *blue* are passed as numbers between | ||
0 and 1. | ||
Use **husl.p.toHex**, **husl.p.toRGB**, **husl.p.fromHex** and | ||
**husl.p.fromRGB** for the pastel variant (HUSLp). Note that HUSLp does | ||
not contain all the colors of RGB, so converting arbitrary RGB to it may | ||
generate invalid HUSLp colors. | ||
HUSL can also be used as a [Stylus](http://learnboost.github.com/stylus/) | ||
plugin. See [here](https://github.com/husl-colors/husl-stylus). | ||
## Testing | ||
```sh | ||
node test.js | ||
``` | ||
Following [semantic versioning](http://semver.org/), the major version must be incremented | ||
whenever the color math changes. These changes can be tested for with snapshot files. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6789
4
20
0
30