Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
value: 'rgba(255, 0, 0, 1)',
onChange: noop,
onStart: noop,
onEnd: noop,
reactive: false
};
/*
Utilities
-----------------------------------------------------------------
*/
const toWhite = color => [color, 'white'];
const toBlack = color => [color, 'black'];
const roundi = culoriRound(0);
const _css = culoriFormatter();
const extract_hsba = color => {
let hsba = culoriHsv(color);
let ret = {};
if (!hsba) return ret;
if (hsba.h !== undefined) ret['hue'] = hsba.h;
if (hsba.s !== undefined) ret['saturation'] = hsba.s * 100;
if (hsba.v !== undefined) ret['brightness'] = hsba.v * 100;
if (hsba.alpha !== undefined) {
ret['opacity'] = roundi(hsba.alpha * 100);
} else {
ret['opacity'] = 100;
}
return ret;
};