"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.colorToHex = void 0;
var chroma_js_1 = __importDefault(require("chroma-js"));
var isChromaColor = function (color) {
    if (chroma_js_1.default.valid(color)) {
        return true;
    }
    return false;
};
function colorToHex(color) {
    var value = color.value;
    if (isChromaColor(value)) {
        return chroma_js_1.default(value).hex();
    }
    return "";
}
exports.colorToHex = colorToHex;
