@csstools/convert-colors 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changes to Convert Colors
2
2
 
3
+ ### 1.4.0 (January 27, 2018)
4
+
5
+ - Add LCH conversions
6
+ - Allow fallbacks in RGB conversions (for gray conversions)
7
+ - Add Lab and LCH tests
8
+ - Simplify test array joining
9
+ - Rename references from "LAB" to "Lab"
10
+
3
11
  ### 1.3.0 (January 25, 2018)
4
12
 
5
13
  - Export all converter combinations of `rgb`, `hsl`, `hwb`, `lab`, `hsv`,
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Linux Build Status][cli-img]][cli-url]
5
5
  [![Windows Build Status][win-img]][win-url]
6
6
 
7
- [Convert Colors] converts colors between RGB, HSL, and HWB.
7
+ [Convert Colors] converts colors between RGB, HSL, HWB, Lab, LCH, HSV, and XYZ.
8
8
 
9
9
  ```js
10
10
  import convert from '@csstools/convert-colors';
@@ -34,39 +34,48 @@ npm install @csstools/convert-colors --save-dev
34
34
  Conversions work by taking arguments that represents a color in one color space
35
35
  and returning an array of that same color in another color space.
36
36
 
37
- ### rgb2hsl
38
-
39
- Converts **red**, **green**, and **blue** to an array of **hue**,
40
- **saturation**, and **lightness**.
41
-
42
- ### rgb2hwb
43
-
44
- Converts **red**, **green**, and **blue** to an array of **hue**,
45
- **whiteness**, and **blackness**.
46
-
47
- ### hsl2rgb
48
-
49
- Converts **hue**, **saturation**, and **lightness** to an array of **red**,
50
- **green**, and **blue**.
51
-
52
- ### hsl2hwb
53
-
54
- Converts **hue**, **saturation**, and **lightness** to an array of **hue**,
55
- **whiteness**, and **blackness**.
56
-
57
- ### hwb2rgb
58
-
59
- Converts **hue**, **whiteness**, and **blackness** to an array of **red**,
60
- **green**, and **blue**.
61
-
62
- ### hwb2hsl
63
-
64
- Converts **hue**, **whiteness**, and **blackness** to an array of **hue**,
65
- **saturation**, and **lightness**.
66
-
67
- ### rgb2hue
68
-
69
- Converts **red**, **green**, and **blue** to a **hue**.
37
+ - rgb2hsl(r, g, b)
38
+ - rgb2hwb(r, g, b)
39
+ - rgb2lab(r, g, b)
40
+ - rgb2lch(r, g, b)
41
+ - rgb2hsv(r, g, b)
42
+ - rgb2xyz(r, g, b)
43
+ - hsl2rgb(h, s, l)
44
+ - hsl2hwb(h, s, l)
45
+ - hsl2lab(h, s, l)
46
+ - hsl2lch(h, s, l)
47
+ - hsl2hsv(h, s, l)
48
+ - hsl2xyz(h, s, l)
49
+ - hwb2rgb(h, w, b)
50
+ - hwb2hsl(h, w, b)
51
+ - hwb2lab(h, w, b)
52
+ - hwb2lch(h, w, b)
53
+ - hwb2hsv(h, w, b)
54
+ - hwb2xyz(h, w, b)
55
+ - lab2rgb(l, a, b)
56
+ - lab2hsl(l, a, b)
57
+ - lab2hwb(l, a, b)
58
+ - lab2lch(l, a, b)
59
+ - lab2hsv(l, a, b)
60
+ - lab2xyz(l, a, b)
61
+ - lch2rgb(l, c, h)
62
+ - lch2hsl(l, c, h)
63
+ - lch2hwb(l, c, h)
64
+ - lch2lab(l, c, h)
65
+ - lch2hsv(l, c, h)
66
+ - lch2xyz(l, c, h)
67
+ - hsv2rgb(h, s, v)
68
+ - hsv2hsl(h, s, v)
69
+ - hsv2hwb(h, s, v)
70
+ - hsv2lab(h, s, v)
71
+ - hsv2lch(h, s, v)
72
+ - hsv2xyz(h, s, v)
73
+ - xyz2rgb(x, y, z)
74
+ - xyz2hsl(x, y, z)
75
+ - xyz2hwb(x, y, z)
76
+ - xyz2lab(x, y, z)
77
+ - xyz2lch(x, y, z)
78
+ - xyz2hsv(x, y, z)
70
79
 
71
80
  [npm-url]: https://www.npmjs.com/package/@csstools/convert-colors
72
81
  [npm-img]: https://img.shields.io/npm/v/@csstools/convert-colors.svg