UNPKG

rrggbbaa

Version:

Color code utility and converter library for NodeJS.

13 lines (11 loc) 482 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // TODO: make use of regexp builder var RegExpForRGB = exports.RegExpForRGB = /[rgb|rgba]\((\d*),\s?(\d*),\s?(\d*)[,]?\s?([\d{.]*)\)/i; var RegExpForHEX = exports.RegExpForHEX = /^#([a-fA-F0-9]{1})([a-fA-F0-9]{1})([a-fA-F0-9]{1})([a-fA-F0-9]{1})?$|^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/i; exports.default = { RegExpForRGB: RegExpForRGB, RegExpForHEX: RegExpForHEX };