1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports._rgbaOrHexString = void 0;
|
4 | var consts_1 = require("./consts");
|
5 | /**
|
6 | * @internal
|
7 | * Get a CSS color string from some color components.
|
8 | * If `a` is specified and not 100, returns an `rgba()` string.
|
9 | * Otherwise returns `hex` prefixed with #.
|
10 | */
|
11 | function _rgbaOrHexString(r, g, b, a, hex) {
|
12 | return a === consts_1.MAX_COLOR_ALPHA || typeof a !== 'number' ? "#" + hex : "rgba(" + r + ", " + g + ", " + b + ", " + a / consts_1.MAX_COLOR_ALPHA + ")";
|
13 | }
|
14 | exports._rgbaOrHexString = _rgbaOrHexString;
|
15 | //# sourceMappingURL=_rgbaOrHexString.js.map |
\ | No newline at end of file |