1 | "use strict";
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports["default"] = hsl;
|
5 | var _hslToHex = _interopRequireDefault(require("../internalHelpers/_hslToHex"));
|
6 | var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
7 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | function hsl(value, saturation, lightness) {
|
32 | if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
33 | return (0, _hslToHex["default"])(value, saturation, lightness);
|
34 | } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
35 | return (0, _hslToHex["default"])(value.hue, value.saturation, value.lightness);
|
36 | }
|
37 | throw new _errors["default"](1);
|
38 | }
|
39 | module.exports = exports.default; |
\ | No newline at end of file |