MCPcopy
hub / github.com/GrapesJS/grapesjs / get

Function get

packages/core/src/utils/ColorPicker.ts:764–780  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

762 }
763
764 function get(opts) {
765 opts = opts || {};
766
767 if (allowEmpty && isEmpty) {
768 return null;
769 }
770
771 return tinycolor.fromRatio(
772 {
773 h: currentHue,
774 s: currentSaturation,
775 v: currentValue,
776 a: Math.round(currentAlpha * 100) / 100,
777 },
778 { format: opts.format || currentPreferredFormat },
779 );
780 }
781
782 function isValid() {
783 return !textInput.hasClass('sp-validation-error');

Callers 10

drawPaletteFunction · 0.70
drawInitialFunction · 0.70
dragStartFunction · 0.70
dragStopFunction · 0.70
showFunction · 0.70
hideFunction · 0.70
setFunction · 0.70
moveFunction · 0.70
updateUIFunction · 0.70
updateOriginalInputFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected