UNPKG

color-transformer-ui

Version:
15 lines 624 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const _constantes_1 = __importDefault(require("./../_constantes")); exports.default = (color) => { if (!color) throw new Error('color-name-to-hex: No color name provided'); const colorFound = _constantes_1.default[color.toLowerCase()]; if (typeof colorFound !== 'undefined') return colorFound; throw new Error(`No hex found for ${color}`); }; //# sourceMappingURL=index.js.map