UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

15 lines (14 loc) 404 B
"use strict"; const Color = require("../Color.cjs"); const type = require("../utils/type.cjs"); Color.prototype.alpha = function(a, mutate = false) { if (a !== void 0 && type(a) === "number") { if (mutate) { this._rgb[3] = a; return this; } return new Color([this._rgb[0], this._rgb[1], this._rgb[2], a], "rgb"); } return this._rgb[3]; }; //# sourceMappingURL=alpha.cjs.map