This repository has been archived on 2023-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
mightyscape-1.1-deprecated/extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/rgbToColorAttribute.js
2021-07-23 02:36:56 +02:00

20 lines
476 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
/**
* Convert an RGB array to a CSS string definition.
* Converts white lines to black as the default.
*/
var _default = function _default(rgb) {
if (rgb[0] === 255 && rgb[1] === 255 && rgb[2] === 255) {
return 'rgb(0, 0, 0)';
} else {
return "rgb(".concat(rgb[0], ", ").concat(rgb[1], ", ").concat(rgb[2], ")");
}
};
exports["default"] = _default;