diff --git a/vendor-overwrites/colorpicker/colorconverter.js b/vendor-overwrites/colorpicker/colorconverter.js index 45808ff1..ad206239 100644 --- a/vendor-overwrites/colorpicker/colorconverter.js +++ b/vendor-overwrites/colorpicker/colorconverter.js @@ -12,6 +12,7 @@ const colorConverter = (() => { HSVtoHSL, constrainHue, snapToInt, + ALPHA_DIGITS: 3, // NAMED_COLORS is added below }; @@ -87,7 +88,10 @@ const colorConverter = (() => { function formatAlpha(a) { return isNaN(a) ? '' : - (a + .5e-6).toFixed(7).slice(0, -1).replace(/^0(?=\.[1-9])|^1\.0+?$|\.?0+$/g, ''); + (a + .5 * Math.pow(10, -colorConverter.ALPHA_DIGITS)) + .toFixed(colorConverter.ALPHA_DIGITS + 1) + .slice(0, -1) + .replace(/^0(?=\.[1-9])|^1\.0+?$|\.?0+$/g, ''); } function RGBtoHSV({r, g, b, a}) { diff --git a/vendor-overwrites/colorpicker/colorpicker.css b/vendor-overwrites/colorpicker/colorpicker.css index f3cb9b26..f9eecd60 100644 --- a/vendor-overwrites/colorpicker/colorpicker.css +++ b/vendor-overwrites/colorpicker/colorpicker.css @@ -87,7 +87,7 @@ .colorpicker-popup { --switcher-width: 30px; position: relative; - width: 350px; + width: 325px; z-index: 1000; transition: opacity .5s; color: var(--label-color); @@ -277,7 +277,7 @@ } .colorpicker-input-field[class$="-a"] { - flex-grow: 1.5; + flex-grow: 1.25; } .colorpicker-hsl-h::before {