mirror of
https://github.com/thangisme/notes.git
synced 2026-07-30 19:20:38 -04:00
Initial commit
This commit is contained in:
+17
@@ -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
|
||||
};
|
||||
Reference in New Issue
Block a user