UNPKG

@chayns/colors

Version:

JavaScript utility functions for the calculation of colors for chayns

13 lines (12 loc) 526 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RGB_REGEX = exports.SHORT_HEX_REGEX = exports.HEX_REGEX = void 0; var HEX_REGEX = /^(?:#)?((?:[0-9a-f]{2}){3,4})$/i; exports.HEX_REGEX = HEX_REGEX; var SHORT_HEX_REGEX = /^(?:#)?((?:[0-9a-f]){3})$/i; exports.SHORT_HEX_REGEX = SHORT_HEX_REGEX; var RGB_REGEX = /^(?:rgb|rgba)\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})(?:\s*,\s*(1|0|(?:0?\.[0-9]+)))?\s*\)$/i; exports.RGB_REGEX = RGB_REGEX; //# sourceMappingURL=constants.js.map