"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var color_string_1 = require("./../vendor/color-string");
var STRING = 'string';
var OBJECT = 'object';
function parseString(str) {
    if (!str) {
        return null;
    }
    if (typeof str === OBJECT || str.trim().slice(0, 3) === 'url') {
        return str;
    }
    return color_string_1.default['get'](str);
}
function generateString(desc) {
    if (typeof desc === STRING) {
        return desc;
    }
    if (!desc) {
        return 'none';
    }
    return color_string_1.default['to'][desc.model](desc.value);
}
exports.default = {
    parseString: parseString,
    generateString: generateString,
};
//# sourceMappingURL=ColorUtils.js.map