Socket
Socket
Sign inDemoInstall

color-space

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-space - npm Package Compare versions

Comparing version 0.5.1 to 1.0.0

14

package.json
{
"name": "color-space",
"description": "Math & data behind color spaces and color conversions.",
"version": "0.5.1",
"version": "1.0.0",
"author": "Deema Yvanow <dfcreative@gmail.com>",

@@ -16,2 +16,3 @@ "repository": {

"./hwb.js",
"./cmy.js",
"./cmyk.js",

@@ -26,3 +27,6 @@ "./xyz.js",

"./huslp.js",
"./cam.js"
"./labh.js",
"./lms.js",
"./ciecam.js",
"./add-converter.js"
],

@@ -59,5 +63,5 @@ "main": "./index.js",

"test": "mocha",
"build": "browserify --standalone color-space ./index.js > color-space.js",
"min": "ccjs color-space.js --language_in=ECMASCRIPT5 --compilation_level=ADVANCED > color-space.min.js && cat color-space.min.js | gzip-size | pretty-bytes",
"build-test": "browserify -r assert -r mumath -r query-relative > test/test.bundle.js"
"build": "browserify --standalone colorSpace ./index.js > color-space.js",
"min": "ccjs color-space.js --language_in=ECMASCRIPT5 > color-space.min.js && cat color-space.min.js | gzip-size | pretty-bytes",
"build-test": "browserify -r ./index:../index -r ./xyy:../xyy -r ./labh:../labh -r ./cmy:../cmy -r husl -r assert -r mumath -r query-relative > test/test.bundle.js"
},

@@ -64,0 +68,0 @@ "dependencies": {

@@ -5,13 +5,34 @@ # Color-space [![Build Status](https://travis-ci.org/dfcreative/color-space.svg?branch=master)](https://travis-ci.org/dfcreative/color-space)

Math and data behind color spaces and color conversions. _Color-space_ provides a uniform interface to well-known color spaces: RGB, HSl, HSV (HSB), [HWB](http://dev.w3.org/csswg/css-color/#the-hwb-notation), CMYK, [XYZ](http://en.wikipedia.org/wiki/CIE_1931_color_space), XYY (YXY), [LAB](http://en.wikipedia.org/wiki/Lab_color_space), LCH<sub>ab</sub>, [LUV](http://en.wikipedia.org/wiki/CIELUV), [LCH<sub>uv</sub>](http://en.wikipedia.org/wiki/CIELUV#Cylindrical_representation), [H<sub>u</sub>SL](http://www.boronine.com/husl/), [H<sub>u</sub>SL<sub>p</sub>](http://www.boronine.com/husl/).
Math and data behind color spaces and color conversions. _Color-space_ provides a uniform interface to the all well known color spaces: RGB, HSl, HSV (HSB), [HWB](http://dev.w3.org/csswg/css-color/#the-hwb-notation), CMYK, CMY, [XYZ](http://en.wikipedia.org/wiki/CIE_1931_color_space), XYY (YXY), [LAB](http://en.wikipedia.org/wiki/Lab_color_space), LCH<sub>ab</sub>, [LUV](http://en.wikipedia.org/wiki/CIELUV), [LCH<sub>uv</sub>](http://en.wikipedia.org/wiki/CIELUV#Cylindrical_representation), [H<sub>u</sub>SL](http://www.boronine.com/husl/), [H<sub>u</sub>SL<sub>p</sub>](http://www.boronine.com/husl/), [LAB<sub>Hunter</sub>](http://en.wikipedia.org/wiki/Lab_color_space#Hunter_Lab), [LMS](http://en.wikipedia.org/wiki/LMS_color_space).
<!--
#### [Converter demo](https://cdn.rawgit.com/dfcreative/color-space/master/test/index.html)
-->
# Use
## In browser:
Drop the script `color-space.js` and use a global object `colorSpace`:
```html
<script src="js/color-space.js"></script>
```
```js
var rgb = colorSpace.rgb;
//convert rgb to hsl
rgb.hsl([255,0,0]);
```
Also you can use [browserify](https://github.com/substack/node-browserify) to get your own build.
## In node:
`$ npm install color-space`
Include all spaces:

@@ -27,3 +48,3 @@

If you aware of size, you can include only needed spaces:
Include only needed spaces (e.g. to shrink final size):

@@ -38,5 +59,3 @@ ```js

Use [browserify](https://github.com/substack/node-browserify) to use in a browser.
# API

@@ -43,0 +62,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc