Merge branch '5.5'
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 31 May 2022 10:00:16 +0000 (12:00 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 31 May 2022 10:00:16 +0000 (12:00 +0200)
1  2 
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Color/Picker.js
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 08abd62ce359f3c15776fced6173671fd62bfd14,e9f7397fe60fbd1d803a15a18403aaeba4e248d2..0bc7eef5c6554396febc4d0a19cbd84bdd5dd4ba
@@@ -153,10 -185,18 +185,21 @@@ define(["require", "exports", "tslib", 
           *
           * @since 5.5
           */
-         getColor() {
-             const color = this.colorInput.value;
-             const alpha = this.alphaInput.value;
-             return { ...ColorUtil.hexToRgb(color), a: +alpha };
+         getColor(source) {
+             const a = parseFloat(this.channels.get("a" /* A */).value);
+             if (source === "hsl" /* HSL */) {
+                 const rgb = ColorUtil.hslToRgb(parseInt(this.hsl.get("hue" /* Hue */).value, 10), parseInt(this.hsl.get("saturation" /* Saturation */).value, 10), parseInt(this.hsl.get("lightness" /* Lightness */).value, 10));
 -                return Object.assign(Object.assign({}, rgb), { a });
++                return {
++                    ...rgb,
++                    a,
++                };
+             }
+             return {
+                 r: parseInt(this.channels.get("r" /* R */).value, 10),
+                 g: parseInt(this.channels.get("g" /* G */).value, 10),
+                 b: parseInt(this.channels.get("b" /* B */).value, 10),
+                 a,
+             };
          }
          /**
           * Opens the color picker after clicking on the picker button.
Simple merge
Simple merge