UNPKG

829 BJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _hslToRgb = _interopRequireDefault(require("./_hslToRgb"));
6var _reduceHexValue = _interopRequireDefault(require("./_reduceHexValue"));
7var _numberToHex = _interopRequireDefault(require("./_numberToHex"));
8function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9function colorToHex(color) {
10 return (0, _numberToHex["default"])(Math.round(color * 255));
11}
12function convertToHex(red, green, blue) {
13 return (0, _reduceHexValue["default"])("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
14}
15function hslToHex(hue, saturation, lightness) {
16 return (0, _hslToRgb["default"])(hue, saturation, lightness, convertToHex);
17}
18var _default = exports["default"] = hslToHex;
19module.exports = exports.default;
\No newline at end of file