Initial commit

This commit is contained in:
Patrick Marsceill
2017-03-09 13:16:08 -05:00
commit b7b0d0d7bf
4147 changed files with 401224 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
var ranges = require('./ranges');
var channelWithDecimalPointPercentageTpl = '\\s*(?:\\.\\d+|_NUMBERS_(?:\\.\\d+)?)%\\s*',
channelWithDecimalPointTpl = channelWithDecimalPointPercentageTpl.replace('%', ''),
// Channels
percentageChannel = new RegExp(channelWithDecimalPointPercentageTpl.replace('_NUMBERS_', ranges['100'].source)),
eightBitChannel = new RegExp(channelWithDecimalPointTpl.replace('_NUMBERS_', ranges['255'].source)),
hueChannel = new RegExp(channelWithDecimalPointTpl.replace('_NUMBERS_', ranges['360'].source)),
alphaChannel = new RegExp(channelWithDecimalPointTpl.replace('_NUMBERS_', ranges['1'].source));
module.exports = {
eightBit: eightBitChannel,
hue: hueChannel,
percentage: percentageChannel,
alpha: alphaChannel
};