UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Microsoft 365.

15 lines 691 B
define(["require", "exports", "./consts"], function (require, exports, consts_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * @internal * Get a CSS color string from some color components. * If `a` is specified and not 100, returns an `rgba()` string. * Otherwise returns `hex` prefixed with #. */ function _rgbaOrHexString(r, g, b, a, hex) { return a === consts_1.MAX_COLOR_ALPHA || typeof a !== 'number' ? "#" + hex : "rgba(" + r + ", " + g + ", " + b + ", " + a / consts_1.MAX_COLOR_ALPHA + ")"; } exports._rgbaOrHexString = _rgbaOrHexString; }); //# sourceMappingURL=_rgbaOrHexString.js.map