"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * 随机颜色方法
 * @author 涂美政
 */
var default_1 = /** @class */ (function () {
    function default_1() {
    }
    /**
     * 随机深色
     */
    default_1.darkColor = function () {
        var color = "";
        while (true) {
            var c1 = Math.round(Math.random() * 255);
            var c2 = Math.round(Math.random() * 255);
            var c3 = Math.round(Math.random() * 255);
            var c4 = c1 * 0.299 + c2 * 0.587 + c3 * 0.114;
            if (c4 < 192) {
                color = "RGB( " + c1 + " , " + c2 + " , " + c3 + " )";
                break;
            }
        }
        return color;
    };
    /**
     * 随机颜色-RGB
     */
    default_1.randomRGBColor = function () {
        var c1 = Math.round(Math.random() * 255);
        var c2 = Math.round(Math.random() * 255);
        var c3 = Math.round(Math.random() * 255);
        return "RGB( " + c1 + " , " + c2 + " , " + c3 + " )";
    };
    /**
     * 随机颜色-十六进制
     */
    default_1.randomHexColor = function () {
        return '#' + Math.floor(Math.random() * 0xffffff).toString(16);
    };
    return default_1;
}());
exports.default = default_1;
