"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.DEFAULT_BORDER_COLOR = void 0;
var _chromatism = _interopRequireDefault(require("chromatism"));
var _colors = require("@atlaskit/theme/colors");
/**
 * For a given color set the alpha channel to alpha
 *
 * @param color color string, suppports HEX, RGB, RGBA etc.
 * @param alpha Alpha channel value as fraction of 1
 * @return CSS RGBA string with applied alpha channel
 */
function setAlpha(color, alpha) {
  var _chromatism$convert$r = _chromatism.default.convert(color).rgb,
    r = _chromatism$convert$r.r,
    g = _chromatism$convert$r.g,
    b = _chromatism$convert$r.b;
  return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
}

/** this is not new usage - old code extracted from editor-core */
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
var DEFAULT_BORDER_COLOR = exports.DEFAULT_BORDER_COLOR = setAlpha(_colors.N800, 0.12);
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */